From 2e78051933db7334f4546af0886b508bcb3628d5 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Wed, 8 Apr 2020 13:56:09 +0200 Subject: [PATCH] tests: fix in_expression_test --- vlib/v/tests/in_expression_test.v | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/vlib/v/tests/in_expression_test.v b/vlib/v/tests/in_expression_test.v index 2abfed7ae7..07d2c0ff20 100644 --- a/vlib/v/tests/in_expression_test.v +++ b/vlib/v/tests/in_expression_test.v @@ -21,9 +21,9 @@ fn test_in_expression(){ a = true && 3 in arr1 assert a == false - a = true && !2 in arr2 + a = true && !(2 in arr2) assert a == false - a = true && !3 in arr2 + a = true && !(3 in arr2) assert a == true a = 1 in arr1 && true @@ -51,9 +51,9 @@ fn test_in_expression_with_enum(){ a = true && Colors.yellow in arr1 assert a == false - a = true && !Colors.blue in arr2 + a = true && !(Colors.blue in arr2) assert a == false - a = true && !Colors.yellow in arr2 + a = true && !(Colors.yellow in arr2) assert a == true a = Colors.green in arr1 && true @@ -81,9 +81,9 @@ fn test_in_expression_with_string(){ a = true && 'abc' in arr1 assert a == false - a = true && !'bc' in arr2 + a = true && !('bc' in arr2) assert a == false - a = true && !'abc' in arr2 + a = true && !('abc' in arr2) assert a == true a = 'ab' in arr1 && true @@ -108,9 +108,9 @@ fn test_optimized_in_expression(){ a = true && 3 in [1, 2] assert a == false - a = true && !2 in [0, 2] + a = true && !(2 in [0, 2]) assert a == false - a = true && !3 in [0, 2] + a = true && !(3 in [0, 2]) assert a == true a = 1 in [1, 2] && true @@ -135,9 +135,9 @@ fn test_optimized_in_expression_with_enum(){ a = true && Colors.yellow in [.green, .blue] assert a == false - a = true && !Colors.blue in [.red, .blue] + a = true && !(Colors.blue in [.red, .blue]) assert a == false - a = true && !Colors.yellow in [.red, .blue] + a = true && !(Colors.yellow in [.red, .blue]) assert a == true a = Colors.green in [.green, .blue] && true @@ -162,9 +162,9 @@ fn test_optimized_in_expression_with_string(){ a = true && 'abc' in ['ab', 'bc'] assert a == false - a = true && !'bc' in ['', 'bc'] + a = true && !('bc' in ['', 'bc']) assert a == false - a = true && !'abc' in ['', 'bc'] + a = true && !('abc' in ['', 'bc']) assert a == true a = 'ab' in ['ab', 'bc'] && true