fix cmdline_test.v
parent
31c1483b9d
commit
c314ab7b60
|
@ -513,9 +513,6 @@ pub fn (a []i64) eq(a2 []i64) bool {
|
||||||
return array_eq(a, a2)
|
return array_eq(a, a2)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (a []string) eq(a2 []string) bool {
|
|
||||||
return array_eq(a, a2)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn (a []byte) eq(a2 []byte) bool {
|
pub fn (a []byte) eq(a2 []byte) bool {
|
||||||
return array_eq(a, a2)
|
return array_eq(a, a2)
|
||||||
|
@ -526,6 +523,19 @@ pub fn (a []f32) eq(a2 []f32) bool {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
pub fn (a1 []string) eq(a2 []string) bool {
|
||||||
|
//return array_eq(a, a2)
|
||||||
|
if a1.len != a2.len {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
for i := 0; i < a1.len; i++ {
|
||||||
|
if a1[i] != a2[i] {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
// compare_i64 for []f64 sort_with_compare()
|
// compare_i64 for []f64 sort_with_compare()
|
||||||
// sort []i64 with quicksort
|
// sort []i64 with quicksort
|
||||||
// usage :
|
// usage :
|
||||||
|
|
|
@ -464,6 +464,7 @@ fn test_map() {
|
||||||
|
|
||||||
fn test_array_str() {
|
fn test_array_str() {
|
||||||
numbers := [1, 2, 3]
|
numbers := [1, 2, 3]
|
||||||
|
// assert numbers == [1,2,3]
|
||||||
numbers2 := [numbers, [4, 5, 6]] // dup str() bug
|
numbers2 := [numbers, [4, 5, 6]] // dup str() bug
|
||||||
assert true
|
assert true
|
||||||
assert numbers.str() == '[1, 2, 3]'
|
assert numbers.str() == '[1, 2, 3]'
|
||||||
|
|
Loading…
Reference in New Issue