fix tests
parent
2ad0d0200d
commit
ceb0139329
|
@ -16,7 +16,7 @@ fn test_ints() {
|
|||
assert a[4] == 4
|
||||
assert a.last() == 4
|
||||
|
||||
mut s := a.str()
|
||||
s := a.str()
|
||||
assert s == '[1, 5, 2, 3, 4]'
|
||||
assert a[1] == 5
|
||||
assert a.last() == 4
|
||||
|
|
|
@ -140,7 +140,7 @@ fn test_clone() {
|
|||
mut a := 'a'
|
||||
a += 'a'
|
||||
a += 'a'
|
||||
mut b := a
|
||||
b := a
|
||||
mut c := a.clone()
|
||||
assert c == a
|
||||
assert c == 'aaa'
|
||||
|
|
|
@ -2,7 +2,7 @@ import math.stats as stats
|
|||
|
||||
fn test_freq() {
|
||||
// Tests were also verified on Wolfram Alpha
|
||||
mut data := [f64(10.0),f64(10.0),f64(5.9),f64(2.7)]
|
||||
data := [f64(10.0),f64(10.0),f64(5.9),f64(2.7)]
|
||||
mut o := stats.freq(data,10.0)
|
||||
assert o == 2
|
||||
o = stats.freq(data,2.7)
|
||||
|
@ -256,4 +256,4 @@ fn test_passing_empty() {
|
|||
assert stats.min(data) == f64(0)
|
||||
assert stats.max(data) == f64(0)
|
||||
assert stats.range(data) == f64(0)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue