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

fix tests

This commit is contained in:
S-YOU
2019-06-27 02:03:35 +09:00
committed by Alexander Medvednikov
parent 2ca6859982
commit d998313bb1
6 changed files with 9 additions and 7 deletions

View File

@ -143,7 +143,7 @@ fn (s string) int() int {
}
fn (s string) f32() f32 {
return C.atof(s.str)
return C.atof(s.str)
}
// ==
@ -332,7 +332,7 @@ pub fn (s string) right(n int) string {
// puts(substr.str) will print 'rivet'
// Avoid using C functions with these substrs!
pub fn (s string) substr(start, end int) string {
/*
/*
if start > end || start >= s.len || end > s.len || start < 0 || end < 0 {
panic('substr($start, $end) out of bounds (len=$s.len)')
return ''

View File

@ -289,4 +289,5 @@ fn test_all_after() {
s := 'fn hello'
q := s.all_after('fn ')
assert q == 'hello'
}