mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
add test for array_repeat with f32/f64
Signed-off-by: Cytown <cytown@gmail.com>
This commit is contained in:
parent
fbe8f6c774
commit
fcf8909c75
@ -95,6 +95,25 @@ fn test_repeat() {
|
||||
b := [7; 3]
|
||||
assert b.len == 3
|
||||
assert b[0] == 7 && b[1] == 7 && b[2] == 7
|
||||
{
|
||||
mut aa := [1.1 ; 10]
|
||||
// FIXME: assert aa[0] == 1.1 will fail, need fix
|
||||
assert aa[0] == f32(1.1)
|
||||
assert aa[5] == f32(1.1)
|
||||
assert aa[9] == f32(1.1)
|
||||
}
|
||||
{
|
||||
mut aa := [f32(1.1) ; 10]
|
||||
assert aa[0] == f32(1.1)
|
||||
assert aa[5] == f32(1.1)
|
||||
assert aa[9] == f32(1.1)
|
||||
}
|
||||
{
|
||||
mut aa := [f64(1.1) ; 10]
|
||||
assert aa[0] == f64(1.1)
|
||||
assert aa[5] == f64(1.1)
|
||||
assert aa[9] == f64(1.1)
|
||||
}
|
||||
}
|
||||
|
||||
fn test_right() {
|
||||
|
Loading…
Reference in New Issue
Block a user