File tree 2 files changed +34
-0
lines changed
crates/compiler/test_gen/src
2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ #[ cfg( feature = "gen-llvm" ) ]
2
+ use crate :: helpers:: llvm:: assert_evals_to;
3
+
4
+ #[ cfg( feature = "gen-dev" ) ]
5
+ use crate :: helpers:: dev:: assert_evals_to;
6
+
7
+ #[ cfg( feature = "gen-wasm" ) ]
8
+ use crate :: helpers:: wasm:: assert_evals_to;
9
+
10
+ use indoc:: indoc;
11
+
12
+ #[ test]
13
+ #[ cfg( any( feature = "gen-llvm" , feature = "gen-dev" , feature = "gen-wasm" ) ) ]
14
+ fn compare_i64 ( ) {
15
+ assert_evals_to ! (
16
+ indoc!(
17
+ r#"
18
+ i : I64
19
+ i = 1
20
+
21
+ j : I64
22
+ j = 2
23
+
24
+ when List.compare i j is
25
+ Equals -> 0
26
+ GreaterThan -> 1
27
+ LessThan -> 2
28
+ "#
29
+ ) ,
30
+ 2 ,
31
+ i64
32
+ ) ;
33
+ }
Original file line number Diff line number Diff line change 5
5
#![ allow( clippy:: float_cmp) ]
6
6
7
7
pub mod gen_abilities;
8
+ pub mod gen_compare;
8
9
pub mod gen_definitions;
9
10
pub mod gen_dict;
10
11
pub mod gen_equality;
You can’t perform that action at this time.
0 commit comments