vlib: remove unused arrays module

pull/4905/head
Delyan Angelov 2020-05-16 00:20:14 +03:00
parent 44502a3fb2
commit 034bf46e4d
4 changed files with 0 additions and 41 deletions

View File

@ -1,11 +0,0 @@
module arrays
/*
pub fn range<T>(start, end T) []T {
mut res := []T{}
for i := start; i < end; i++ {
res << i
}
return res
}
*/

View File

@ -1,28 +0,0 @@
import arrays
fn test_range() {
start_pos := 3
end_pos := 10
arr1 := arrays.range<int>(start_pos, end_pos)
assert arr1.len == end_pos - start_pos
for i, c in arr1 {
assert c == i + start_pos
}
arr2 := arrays.range<f32>(start_pos, end_pos)
assert arr2.len == end_pos - start_pos
for i, c in arr2 {
assert c == f32(i + start_pos)
}
arr3 := arrays.range<int>(start_pos, start_pos - 1)
assert arr3.len == 0
arr4 := arrays.range<int>(start_pos, start_pos)
assert arr4.len == 0
arr5 := arrays.range<int>(start_pos, start_pos + 1)
assert arr5.len == 1
assert arr5[0] == start_pos
}

View File

@ -4,7 +4,6 @@
module http module http
import time import time
import arrays
import strings import strings
pub struct Cookie { pub struct Cookie {

View File

@ -1,5 +1,4 @@
import net.http import net.http
import time
struct SetCookieTestCase { struct SetCookieTestCase {
cookie &http.Cookie cookie &http.Cookie