1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

orm_test: remove pg import for now

This commit is contained in:
Alexander Medvednikov 2019-08-18 15:02:30 +03:00
parent 22348f2245
commit f9fb6f0be4
3 changed files with 31 additions and 31 deletions

View File

@ -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

View File

@ -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++ {

View File

@ -1,4 +1,4 @@
import pg
//import pg
struct Modules {
id int