checker: merge mod_op_wrong_type_err tests to just one (#7490)
parent
0dd385d480
commit
b08fe73614
|
@ -1,5 +0,0 @@
|
||||||
vlib/v/checker/tests/mod_op_wrong_left_type_err_a.vv:2:10: error: float modulo not allowed, use math.fmod() instead
|
|
||||||
1 | fn main() {
|
|
||||||
2 | println(0.5 % 1)
|
|
||||||
| ~~~
|
|
||||||
3 | }
|
|
|
@ -1,3 +0,0 @@
|
||||||
fn main() {
|
|
||||||
println(0.5 % 1)
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
vlib/v/checker/tests/mod_op_wrong_left_type_err_b.vv:2:10: error: mismatched types `[]int` and `any_int`
|
|
||||||
1 | fn main() {
|
|
||||||
2 | println([1,2,3] % 1)
|
|
||||||
| ~~~~~~~
|
|
||||||
3 | }
|
|
|
@ -1,3 +0,0 @@
|
||||||
fn main() {
|
|
||||||
println([1,2,3] % 1)
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
vlib/v/checker/tests/mod_op_wrong_left_type_err_c.vv:4:10: error: mismatched types `Aaa` and `any_int`
|
|
||||||
2 | fn main() {
|
|
||||||
3 | a := Aaa{}
|
|
||||||
4 | println(a % 1)
|
|
||||||
| ^
|
|
||||||
5 | }
|
|
|
@ -1,5 +0,0 @@
|
||||||
struct Aaa{}
|
|
||||||
fn main() {
|
|
||||||
a := Aaa{}
|
|
||||||
println(a % 1)
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
vlib/v/checker/tests/mod_op_wrong_left_type_err_d.vv:3:10: error: mismatched types `map[string]int` and `any_int`
|
|
||||||
1 | fn main() {
|
|
||||||
2 | a := map[string]int
|
|
||||||
3 | println(a % 1)
|
|
||||||
| ^
|
|
||||||
4 | }
|
|
|
@ -1,4 +0,0 @@
|
||||||
fn main() {
|
|
||||||
a := map[string]int
|
|
||||||
println(a % 1)
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
vlib/v/checker/tests/mod_op_wrong_right_type_err_a.vv:2:14: error: float modulo not allowed, use math.fmod() instead
|
|
||||||
1 | fn main() {
|
|
||||||
2 | println(1 % 0.5)
|
|
||||||
| ~~~
|
|
||||||
3 | }
|
|
|
@ -1,3 +0,0 @@
|
||||||
fn main() {
|
|
||||||
println(1 % 0.5)
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
vlib/v/checker/tests/mod_op_wrong_right_type_err_b.vv:2:14: error: mismatched types `any_int` and `[]int`
|
|
||||||
1 | fn main() {
|
|
||||||
2 | println(1 % [1,2,3])
|
|
||||||
| ~~~~~~~
|
|
||||||
3 | }
|
|
|
@ -1,3 +0,0 @@
|
||||||
fn main() {
|
|
||||||
println(1 % [1,2,3])
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
vlib/v/checker/tests/mod_op_wrong_right_type_err_c.vv:4:14: error: mismatched types `any_int` and `Aaa`
|
|
||||||
2 | fn main() {
|
|
||||||
3 | a := Aaa{}
|
|
||||||
4 | println(1 % a)
|
|
||||||
| ^
|
|
||||||
5 | }
|
|
|
@ -1,5 +0,0 @@
|
||||||
struct Aaa{}
|
|
||||||
fn main() {
|
|
||||||
a := Aaa{}
|
|
||||||
println(1 % a)
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
vlib/v/checker/tests/mod_op_wrong_right_type_err_d.vv:3:14: error: mismatched types `any_int` and `map[string]int`
|
|
||||||
1 | fn main() {
|
|
||||||
2 | a := map[string]int
|
|
||||||
3 | println(1 % a)
|
|
||||||
| ^
|
|
||||||
4 | }
|
|
|
@ -1,4 +0,0 @@
|
||||||
fn main() {
|
|
||||||
a := map[string]int
|
|
||||||
println(1 % a)
|
|
||||||
}
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
vlib/v/checker/tests/mod_op_wrong_type_err.vv:3:10: error: float modulo not allowed, use math.fmod() instead
|
||||||
|
1 | struct Aaa{}
|
||||||
|
2 | fn main() {
|
||||||
|
3 | println(0.5 % 1)
|
||||||
|
| ~~~
|
||||||
|
4 | println(1 % 0.5)
|
||||||
|
5 | println([1,2,3] % 1)
|
||||||
|
vlib/v/checker/tests/mod_op_wrong_type_err.vv:4:14: error: float modulo not allowed, use math.fmod() instead
|
||||||
|
2 | fn main() {
|
||||||
|
3 | println(0.5 % 1)
|
||||||
|
4 | println(1 % 0.5)
|
||||||
|
| ~~~
|
||||||
|
5 | println([1,2,3] % 1)
|
||||||
|
6 | println(1 % [1,2,3])
|
||||||
|
vlib/v/checker/tests/mod_op_wrong_type_err.vv:5:10: error: mismatched types `[]int` and `any_int`
|
||||||
|
3 | println(0.5 % 1)
|
||||||
|
4 | println(1 % 0.5)
|
||||||
|
5 | println([1,2,3] % 1)
|
||||||
|
| ~~~~~~~
|
||||||
|
6 | println(1 % [1,2,3])
|
||||||
|
7 | a := Aaa{}
|
||||||
|
vlib/v/checker/tests/mod_op_wrong_type_err.vv:6:14: error: mismatched types `any_int` and `[]int`
|
||||||
|
4 | println(1 % 0.5)
|
||||||
|
5 | println([1,2,3] % 1)
|
||||||
|
6 | println(1 % [1,2,3])
|
||||||
|
| ~~~~~~~
|
||||||
|
7 | a := Aaa{}
|
||||||
|
8 | println(a % 1)
|
||||||
|
vlib/v/checker/tests/mod_op_wrong_type_err.vv:8:10: error: mismatched types `Aaa` and `any_int`
|
||||||
|
6 | println(1 % [1,2,3])
|
||||||
|
7 | a := Aaa{}
|
||||||
|
8 | println(a % 1)
|
||||||
|
| ^
|
||||||
|
9 | println(1 % a)
|
||||||
|
10 | b := map[string]int
|
||||||
|
vlib/v/checker/tests/mod_op_wrong_type_err.vv:9:14: error: mismatched types `any_int` and `Aaa`
|
||||||
|
7 | a := Aaa{}
|
||||||
|
8 | println(a % 1)
|
||||||
|
9 | println(1 % a)
|
||||||
|
| ^
|
||||||
|
10 | b := map[string]int
|
||||||
|
11 | println(b % 1)
|
||||||
|
vlib/v/checker/tests/mod_op_wrong_type_err.vv:11:10: error: mismatched types `map[string]int` and `any_int`
|
||||||
|
9 | println(1 % a)
|
||||||
|
10 | b := map[string]int
|
||||||
|
11 | println(b % 1)
|
||||||
|
| ^
|
||||||
|
12 | println(1 % b)
|
||||||
|
13 | }
|
||||||
|
vlib/v/checker/tests/mod_op_wrong_type_err.vv:12:14: error: mismatched types `any_int` and `map[string]int`
|
||||||
|
10 | b := map[string]int
|
||||||
|
11 | println(b % 1)
|
||||||
|
12 | println(1 % b)
|
||||||
|
| ^
|
||||||
|
13 | }
|
|
@ -0,0 +1,13 @@
|
||||||
|
struct Aaa{}
|
||||||
|
fn main() {
|
||||||
|
println(0.5 % 1)
|
||||||
|
println(1 % 0.5)
|
||||||
|
println([1,2,3] % 1)
|
||||||
|
println(1 % [1,2,3])
|
||||||
|
a := Aaa{}
|
||||||
|
println(a % 1)
|
||||||
|
println(1 % a)
|
||||||
|
b := map[string]int
|
||||||
|
println(b % 1)
|
||||||
|
println(1 % b)
|
||||||
|
}
|
Loading…
Reference in New Issue