@@ -17,17 +17,17 @@ fn simple() {
17
17
18
18
let r#type = Type :: parse ( & context, "i32" ) . unwrap ( ) ;
19
19
let block = Block :: new ( & [ ( r#type, location) , ( r#type, location) ] ) ;
20
- let op = operand_test:: simple (
20
+ let operation = operand_test:: simple (
21
21
& context,
22
22
r#type,
23
23
block. argument ( 0 ) . unwrap ( ) . into ( ) ,
24
24
block. argument ( 1 ) . unwrap ( ) . into ( ) ,
25
25
location,
26
26
) ;
27
27
28
- assert_eq ! ( op . lhs( ) . unwrap( ) , block. argument( 0 ) . unwrap( ) . into( ) ) ;
29
- assert_eq ! ( op . rhs( ) . unwrap( ) , block. argument( 1 ) . unwrap( ) . into( ) ) ;
30
- assert_eq ! ( op . operation( ) . operand_count( ) , 2 ) ;
28
+ assert_eq ! ( operation . lhs( ) . unwrap( ) , block. argument( 0 ) . unwrap( ) . into( ) ) ;
29
+ assert_eq ! ( operation . rhs( ) . unwrap( ) , block. argument( 1 ) . unwrap( ) . into( ) ) ;
30
+ assert_eq ! ( operation . operation( ) . operand_count( ) , 2 ) ;
31
31
}
32
32
33
33
#[ test]
@@ -39,7 +39,7 @@ fn variadic_after_single() {
39
39
40
40
let r#type = Type :: parse ( & context, "i32" ) . unwrap ( ) ;
41
41
let block = Block :: new ( & [ ( r#type, location) , ( r#type, location) , ( r#type, location) ] ) ;
42
- let op = operand_test:: variadic (
42
+ let operation = operand_test:: variadic (
43
43
& context,
44
44
r#type,
45
45
block. argument ( 0 ) . unwrap ( ) . into ( ) ,
@@ -50,9 +50,18 @@ fn variadic_after_single() {
50
50
location,
51
51
) ;
52
52
53
- assert_eq ! ( op. first( ) . unwrap( ) , block. argument( 0 ) . unwrap( ) . into( ) ) ;
54
- assert_eq ! ( op. others( ) . next( ) , Some ( block. argument( 2 ) . unwrap( ) . into( ) ) ) ;
55
- assert_eq ! ( op. others( ) . nth( 1 ) , Some ( block. argument( 1 ) . unwrap( ) . into( ) ) ) ;
56
- assert_eq ! ( op. operation( ) . operand_count( ) , 3 ) ;
57
- assert_eq ! ( op. others( ) . count( ) , 2 ) ;
53
+ assert_eq ! (
54
+ operation. first( ) . unwrap( ) ,
55
+ block. argument( 0 ) . unwrap( ) . into( )
56
+ ) ;
57
+ assert_eq ! (
58
+ operation. others( ) . next( ) ,
59
+ Some ( block. argument( 2 ) . unwrap( ) . into( ) )
60
+ ) ;
61
+ assert_eq ! (
62
+ operation. others( ) . nth( 1 ) ,
63
+ Some ( block. argument( 1 ) . unwrap( ) . into( ) )
64
+ ) ;
65
+ assert_eq ! ( operation. operation( ) . operand_count( ) , 3 ) ;
66
+ assert_eq ! ( operation. others( ) . count( ) , 2 ) ;
58
67
}
0 commit comments