From f9fb6f0be4f1f65d029712099e53fa1c64f094af Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sun, 18 Aug 2019 15:02:30 +0300 Subject: [PATCH] orm_test: remove pg import for now --- vlib/builtin/string_test.v | 58 +++++++++++++++++++------------------- vlib/freetype/freetype.v | 2 +- vlib/orm/orm_test.v | 2 +- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/vlib/builtin/string_test.v b/vlib/builtin/string_test.v index 3ae3a452f5..2970eee29f 100644 --- a/vlib/builtin/string_test.v +++ b/vlib/builtin/string_test.v @@ -56,7 +56,7 @@ fn test_ge() { assert b>=(a) assert c>=(b) assert d>=(c) - assert !(c>=d) + assert !(c>=d) assert e>=(a) } @@ -108,11 +108,11 @@ fn test_split() { assert vals[2]== 'blue' // ///////// s = 'lalala' - vals = s.split('a') - assert vals.len == 3 - assert vals[0] == 'l' - assert vals[1] == 'l' - assert vals[2] == 'l' + vals = s.split('a') + assert vals.len == 3 + assert vals[0] == 'l' + assert vals[1] == 'l' + assert vals[2] == 'l' } fn test_trim_space() { @@ -137,7 +137,7 @@ fn test_join() { assert s == 'a b c' strings = ['one two ', - 'three! + 'three! four!'] s = strings.join(' ') assert s.contains('one') && s.contains('two ') && s.contains('four') @@ -316,35 +316,35 @@ fn test_reverse() { struct Foo { - bar int -} + bar int +} fn (f Foo) baz() string { - return 'baz' -} + return 'baz' +} fn test_interpolation() { - num := 7 - mut s := 'number=$num' - assert s == 'number=7' - foo := Foo{} - s = 'baz=${foo.baz()}' - assert s == 'baz=baz' - -} + num := 7 + mut s := 'number=$num' + assert s == 'number=7' + foo := Foo{} + s = 'baz=${foo.baz()}' + assert s == 'baz=baz' + +} fn test_bytes_to_string() { mut buf := calloc(10) - buf[0] = `h` - buf[1] = `e` - buf[2] = `l` - buf[3] = `l` - buf[4] = `o` - assert string(buf) == 'hello' - assert string(buf, 2) == 'he' - bytes := [`h`, `e`, `l`, `l`, `o`] - assert string(bytes, 5) == 'hello' -} + buf[0] = `h` + buf[1] = `e` + buf[2] = `l` + buf[3] = `l` + buf[4] = `o` + assert string(buf) == 'hello' + assert string(buf, 2) == 'he' + bytes := [`h`, `e`, `l`, `l`, `o`] + assert string(bytes, 5) == 'hello' +} fn test_count() { assert ''.count('') == 0 diff --git a/vlib/freetype/freetype.v b/vlib/freetype/freetype.v index 9e5abc8c85..5f03dcc2cb 100644 --- a/vlib/freetype/freetype.v +++ b/vlib/freetype/freetype.v @@ -241,7 +241,7 @@ pub fn new_context(cfg gg.Cfg) *Context { // A dirty hack to implement rendering of cyrillic letters. // All UTF-8 must be supported. fn (ctx mut Context) init_utf8_runes() { - s := '≈йцукенгшщзхъфывапролджэячсмитьбюЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ' + s := '≈≠⩽⩾йцукенгшщзхъфывапролджэячсмитьбюЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ' println(s) us := s.ustring() for i := 0; i < us.len; i++ { diff --git a/vlib/orm/orm_test.v b/vlib/orm/orm_test.v index c3efc4f6bd..98c12d6b34 100644 --- a/vlib/orm/orm_test.v +++ b/vlib/orm/orm_test.v @@ -1,4 +1,4 @@ -import pg +//import pg struct Modules { id int