tests: ignore vlib/v/checker/tests/*.v files (only *.vv are sources there)

pull/4639/head
Delyan Angelov 2020-04-28 16:43:00 +03:00
parent 0afaef5818
commit 8c526ad05b
90 changed files with 1 additions and 601 deletions

1
.gitignore vendored
View File

@ -88,3 +88,4 @@ vlib/v/tests/inout/*.v
vlib/v/checker/tests/inout/*.v
vlib/v/checker/tests/inout/*.c
!vlib/v/checker/tests/inout/*_test.v
vlib/v/checker/tests/*.v

View File

@ -1,4 +0,0 @@
struct A{}
fn main() {
A{} + 10
}

View File

@ -1,3 +0,0 @@
fn main() {
[1,2,3] + 10
}

View File

@ -1,4 +0,0 @@
fn main() {
a := map[string]int
a + 10
}

View File

@ -1,4 +0,0 @@
struct A{}
fn main() {
10 + A{}
}

View File

@ -1,3 +0,0 @@
fn main() {
10 + [1,2,3]
}

View File

@ -1,4 +0,0 @@
fn main() {
a := map[string]int
10 + a
}

View File

@ -1,5 +0,0 @@
type Pigeon Bird
fn main() {
}

View File

@ -1,4 +0,0 @@
fn main() {
mut foo := 0.5
foo <<= 1
}

View File

@ -1,4 +0,0 @@
fn main() {
mut foo := 10
foo %= 'hello'
}

View File

@ -1,4 +0,0 @@
fn main() {
mut foo := 'hello'
foo *= 10
}

View File

@ -1,4 +0,0 @@
fn main() {
mut foo := 1.5
foo /= true
}

View File

@ -1,4 +0,0 @@
fn main() {
mut foo := 'hello'
foo -= `a`
}

View File

@ -1,4 +0,0 @@
fn main() {
mut foo := 10
foo -= false
}

View File

@ -1,4 +0,0 @@
fn main() {
mut foo := true
foo += false
}

View File

@ -1,4 +0,0 @@
fn main() {
mut foo := 'hello'
foo += false
}

View File

@ -1,4 +0,0 @@
fn main() {
mut foo := 1.5
foo += 'hello'
}

View File

@ -1,3 +0,0 @@
fn main() {
0.5 & 1
}

View File

@ -1,3 +0,0 @@
fn main() {
1 | 0.5
}

View File

@ -1,10 +0,0 @@
struct Context {
pub mut:
vb string
}
fn main() {
mut ctx := Context{}
x := 2.32
ctx.vb = [1.1, x, 3.3, 4.4, 5.0, 6.0, 7.0, 8.9]!!
}

View File

@ -1,3 +0,0 @@
fn main() {
__abc := 1
}

View File

@ -1,4 +0,0 @@
struct A{}
fn main() {
A{} / 10
}

View File

@ -1,3 +0,0 @@
fn main() {
[1,2,3] / 10
}

View File

@ -1,4 +0,0 @@
fn main() {
a := map[string]int
a / 10
}

View File

@ -1,4 +0,0 @@
struct A{}
fn main() {
10 / A{}
}

View File

@ -1,3 +0,0 @@
fn main() {
10 / [1,2,3]
}

View File

@ -1,4 +0,0 @@
fn main() {
a := map[string]int
10 / a
}

View File

@ -1,3 +0,0 @@
fn main() {
println(1/0)
}

View File

@ -1,11 +0,0 @@
module main
enum Color {
green = 'green',
yellow = 1+1,
blue,
}
fn main(){
println('hello')
}

View File

@ -1,7 +0,0 @@
type PantsCreator = fn (a Shirt) Pants
type PantsConsumer = fn (p Pants)
fn main() {
}

View File

@ -1,5 +0,0 @@
fn main() {
for a in 52 {
println(a)
}
}

View File

@ -1,5 +0,0 @@
fn main() {
for i in 10..10.5 {
println(i)
}
}

View File

@ -1,5 +0,0 @@
fn main() {
for i in 'a'..'b' {
println(i)
}
}

View File

@ -1,3 +0,0 @@
fn main() {
go 1
}

View File

@ -1,10 +0,0 @@
struct A {
i []int
}
fn main() {
mut a := A{
i: [0]
}
a.i[0] = 3
}

View File

@ -1,15 +0,0 @@
struct A {
mut:
i []int
}
struct B {
a A
}
fn main() {
mut b := B{
a: A{}
}
b.a.i << 3
}

View File

@ -1,9 +0,0 @@
struct A {
pub mut:
i []int
}
fn main() {
a := A{}
a.i[0] += 3
}

View File

@ -1,9 +0,0 @@
struct A {
pub mut:
i []int
}
fn main() {
a := []A{}
a[0].i << 3
}

View File

@ -1,4 +0,0 @@
fn main() {
a := [1, 2]
a << 3
}

View File

@ -1,9 +0,0 @@
struct A {
pub:
i1 int
}
fn main() {
a := A{1}
a.i1 = 2
}

View File

@ -1,9 +0,0 @@
struct A {
i int
}
fn main() {
mut a := A{}
a.i++
a.i--
}

View File

@ -1,5 +0,0 @@
fn main() {
m := map[string]int
m['test']++
m['test']--
}

View File

@ -1,10 +0,0 @@
struct A {
mut:
i int
}
fn main() {
a := A{}
a.i++
a.i--
}

View File

@ -1,4 +0,0 @@
fn main() {
a := 1
a = 2
}

View File

@ -1,5 +0,0 @@
fn main() {
a := 1
a++
a--
}

View File

@ -1,37 +0,0 @@
type Int = int
type Str2 = string
type Str3 = Str2
fn main() {
a_i := [1, 2, 3]
a_s := ['1', '2', '3']
m := {
'test': 1
}
s := 'abcd'
if 1 in a_s {
println('ok')
}
if 2 in m {
println('yeah')
}
if 3 in s {
println('dope')
}
if `a` in s {
println("oh no :'(")
}
if 1 in 12 {
println('right')
}
if Int(2) in m {
println('yeah')
}
if Str2('3') in a_i {
println('sure')
}
if Str3('2') in a_i {
println('all right')
}
}

View File

@ -1,11 +0,0 @@
type Integer = i8 | i16 | int | i64
fn main() {
fn_with_sum_type_param(1)
}
fn fn_with_sum_type_param(i Integer) {
if i is SomethingThatDontExist {
println('It should fail !')
}
}

View File

@ -1,4 +0,0 @@
fn main() {
mut l := []int{}
l << 'test'
}

View File

@ -1,3 +0,0 @@
fn main() {
main()
}

View File

@ -1,52 +0,0 @@
enum Color {
red
green
blue
}
struct St1 {}
struct St2 {}
type St = St1 | St2
fn test_sum_type(i St) {
match i {
St1 { println('St1') }
St1 { println('St1') }
St2 { println('St2') }
}
match i {
St1 { println('St1') }
St1 { println('St1') }
else { println('else') }
}
}
fn test_enum(c Color) {
match c {
.red { println('red') }
.green { println('green') }
.green { println('green') }
.blue { println('blue') }
}
match c {
.red, .green { println('red green') }
.green { println('green') }
else { println('else') }
}
}
fn test_int(i int) {
match i {
1 { println('1') }
2 { println('2') }
2 { println('3') }
else { println('else') }
}
}
fn main() {
test_sum_type(St1{})
test_enum(.red)
test_int(2)
}

View File

@ -1,7 +0,0 @@
fn main() {
match 1 {
1 { println('1') }
else { println('else') }
4 { println('4') }
}
}

View File

@ -1,41 +0,0 @@
type A = int | string | f64
fn main() {
x := A('test')
_ = match x {
int {
'int'
}
string {
'string'
}
}
_ := match x {
int {
'int'
}
string {
'string'
}
f64 {
'f64'
}
else {
'else'
}
}
_ := match x {
int {
'int'
}
string {
'string'
}
else {
'else'
}
f64 {
'f64'
}
}
}

View File

@ -1,10 +0,0 @@
type Asd = int
fn main() {
res := match Asd {
1 { 'foo' }
2 { 'test' }
else { '' }
}
_ = res
}

View File

@ -1,4 +0,0 @@
struct A{}
fn main() {
A{} - 10
}

View File

@ -1,3 +0,0 @@
fn main() {
[1,2,3] - 10
}

View File

@ -1,4 +0,0 @@
fn main() {
a := map[string]int
a - 10
}

View File

@ -1,4 +0,0 @@
struct A{}
fn main() {
10 - A{}
}

View File

@ -1,3 +0,0 @@
fn main() {
10 - [1,2,3]
}

View File

@ -1,4 +0,0 @@
fn main() {
a := map[string]int
10 - a
}

View File

@ -1,3 +0,0 @@
fn main() {
0.5 % 1
}

View File

@ -1,3 +0,0 @@
fn main() {
0.5 % 1
}

View File

@ -1,3 +0,0 @@
fn main() {
[1,2,3] % 1
}

View File

@ -1,5 +0,0 @@
struct A{}
fn main() {
a := A{}
a % 1
}

View File

@ -1,4 +0,0 @@
fn main() {
a := map[string]int
a % 1
}

View File

@ -1,3 +0,0 @@
fn main() {
1 % 0.5
}

View File

@ -1,3 +0,0 @@
fn main() {
1 % 0.5
}

View File

@ -1,3 +0,0 @@
fn main() {
1 % [1,2,3]
}

View File

@ -1,5 +0,0 @@
struct A{}
fn main() {
a := A{}
1 % a
}

View File

@ -1,4 +0,0 @@
fn main() {
a := map[string]int
1 % a
}

View File

@ -1,4 +0,0 @@
struct A{}
fn main() {
A{} * 10
}

View File

@ -1,3 +0,0 @@
fn main() {
[1,2,3] * 10
}

View File

@ -1,4 +0,0 @@
fn main() {
a := map[string]int
a * 10
}

View File

@ -1,4 +0,0 @@
struct A{}
fn main() {
10 * A{}
}

View File

@ -1,3 +0,0 @@
fn main() {
10 * [1,2,3]
}

View File

@ -1,4 +0,0 @@
fn main() {
a := map[string]int
10 * a
}

View File

@ -1,3 +0,0 @@
fn no_main() {
println('Hello world !')
}

View File

@ -1,30 +0,0 @@
module main
pub type Integer = int
pub type Float = f32 | f64
// Buggy ATM
// pub type Fn = fn () int
pub enum Color {
red
green
blue
}
pub const (
w = 'world'
)
pub fn my_fn() int {
return 1
}
pub fn main() {
println('main')
}
pub struct MyStruct {
field int
}

View File

@ -1,5 +0,0 @@
fn test() bool {
return 100
}
fn main() {}

View File

@ -1,3 +0,0 @@
fn main() {
0.5 << 1
}

View File

@ -1,3 +0,0 @@
fn main() {
1 << 0.5
}

View File

@ -1,8 +0,0 @@
struct Test {
foo bool
}
fn main() {
t := Test{true, false}
_ = t
}

View File

@ -1,5 +0,0 @@
struct abc {
}
fn main(){}

View File

@ -1,10 +0,0 @@
struct A {
i int
}
fn main() {
a := A{
i: 1
}
a.i = 2
}

View File

@ -1,11 +0,0 @@
struct Test {
foo bool
}
fn main() {
t := Test{
foo: true
bar: false
}
_ = t
}

View File

@ -1,5 +0,0 @@
type Miscellaneous = Nope | Inexistant | int
fn main() {
}

View File

@ -1,8 +0,0 @@
module main
struct Test {}
fn main() {
t := Test{}
println(t.sdd)
}

View File

@ -1,8 +0,0 @@
module main
struct Test {}
fn main() {
t := Test{}
println(t.sdd())
}

View File

@ -1,9 +0,0 @@
fn main() {
if (1 == 1) {
println('yeay')
} else if (1 == 2) {
println("oh no :'(")
} else if (1 == 3) {
println("what's wrong with physics ????")
}
}

View File

@ -1,8 +0,0 @@
module main
fn main() {
mut a := 'aa'
a += x('a','b')
mut b := 'abcdef'
_ = b
}

View File

@ -1,8 +0,0 @@
fn x(x,y int) {
}
fn main(){
mut a := ''
a = x(1,2) // hello
eprintln('a: $a')
}