@@ -9,7 +9,7 @@ use crate::channel_handler::game::Game;
9
9
use crate :: common:: types:: { AllocEncoder , Amount , Error , GameID , Hash , Sha256Input } ;
10
10
use crate :: tests:: game:: { GameAction , GameActionResult } ;
11
11
12
- #[ cfg( features = "sim-tests" ) ]
12
+ #[ cfg( feature = "sim-tests" ) ]
13
13
use crate :: tests:: simenv:: SimulatorEnvironment ;
14
14
15
15
pub fn load_calpoker ( allocator : & mut AllocEncoder , game_id : GameID ) -> Result < Game , Error > {
@@ -20,7 +20,7 @@ pub fn load_calpoker(allocator: &mut AllocEncoder, game_id: GameID) -> Result<Ga
20
20
)
21
21
}
22
22
23
- #[ cfg( features = "sim-tests" ) ]
23
+ #[ cfg( feature = "sim-tests" ) ]
24
24
#[ test]
25
25
fn test_load_calpoker ( ) {
26
26
let mut allocator = AllocEncoder :: new ( ) ;
@@ -35,7 +35,7 @@ fn test_load_calpoker() {
35
35
. expect ( "should get a sim env" ) ;
36
36
}
37
37
38
- #[ cfg( features = "sim-tests" ) ]
38
+ #[ cfg( feature = "sim-tests" ) ]
39
39
fn run_calpoker_play_test (
40
40
allocator : & mut AllocEncoder ,
41
41
moves : & [ GameAction ] ,
@@ -82,7 +82,7 @@ pub fn test_moves_1(allocator: &mut AllocEncoder) -> [GameAction; 5] {
82
82
]
83
83
}
84
84
85
- #[ cfg( features = "sim-tests" ) ]
85
+ #[ cfg( feature = "sim-tests" ) ]
86
86
#[ test]
87
87
fn test_play_calpoker_happy_path ( ) {
88
88
let mut allocator = AllocEncoder :: new ( ) ;
@@ -91,8 +91,8 @@ fn test_play_calpoker_happy_path() {
91
91
debug ! ( "play_result {test1:?}" ) ;
92
92
}
93
93
94
- #[ cfg( features = "sim-tests" ) ]
95
94
#[ test]
95
+ #[ cfg( feature = "sim-tests" ) ]
96
96
fn test_play_calpoker_on_chain_after_1_move_p1 ( ) {
97
97
let mut allocator = AllocEncoder :: new ( ) ;
98
98
@@ -106,8 +106,8 @@ fn test_play_calpoker_on_chain_after_1_move_p1() {
106
106
debug ! ( "play_result {test2:?}" ) ;
107
107
}
108
108
109
- #[ cfg( features = "sim-tests" ) ]
110
109
#[ test]
110
+ #[ cfg( feature = "sim-tests" ) ]
111
111
fn test_play_calpoker_on_chain_after_1_move_p0_lost_message ( ) {
112
112
let mut allocator = AllocEncoder :: new ( ) ;
113
113
let moves = test_moves_1 ( & mut allocator) ;
@@ -118,8 +118,8 @@ fn test_play_calpoker_on_chain_after_1_move_p0_lost_message() {
118
118
debug ! ( "play_result {test3:?}" ) ;
119
119
}
120
120
121
- #[ cfg( features = "sim-tests" ) ]
122
121
#[ test]
122
+ #[ cfg( feature = "sim-tests" ) ]
123
123
fn test_play_calpoker_on_chain_after_1_move_p0 ( ) {
124
124
let mut allocator = AllocEncoder :: new ( ) ;
125
125
let moves = test_moves_1 ( & mut allocator) ;
@@ -129,8 +129,8 @@ fn test_play_calpoker_on_chain_after_1_move_p0() {
129
129
debug ! ( "play_result {test3:?}" ) ;
130
130
}
131
131
132
- #[ cfg( features = "sim-tests" ) ]
133
132
#[ test]
133
+ #[ cfg( feature = "sim-tests" ) ]
134
134
fn test_play_calpoker_on_chain_after_2_moves_p0 ( ) {
135
135
let mut allocator = AllocEncoder :: new ( ) ;
136
136
let moves = test_moves_1 ( & mut allocator) ;
@@ -140,8 +140,9 @@ fn test_play_calpoker_on_chain_after_2_moves_p0() {
140
140
let test4 = run_calpoker_play_test ( & mut allocator, & on_chain_moves_3) . expect ( "should work" ) ;
141
141
debug ! ( "play_result {test4:?}" ) ;
142
142
}
143
- # [ cfg ( features = "sim-tests" ) ]
143
+
144
144
#[ test]
145
+ #[ cfg( feature = "sim-tests" ) ]
145
146
fn test_play_calpoker_on_chain_after_2_moves_p1 ( ) {
146
147
let mut allocator = AllocEncoder :: new ( ) ;
147
148
let moves = test_moves_1 ( & mut allocator) ;
0 commit comments