@@ -4,14 +4,14 @@ use snapbox::cmd::{cargo_bin, Command};
4
4
use scarb_test_support:: cargo:: manifest_dir;
5
5
6
6
#[ test]
7
- fn cairo_test_success ( ) {
7
+ fn hello_world ( ) {
8
8
let example = manifest_dir ( )
9
9
. parent ( )
10
10
. unwrap ( )
11
11
. parent ( )
12
12
. unwrap ( )
13
13
. join ( "examples" )
14
- . join ( "cairo_run_example " ) ;
14
+ . join ( "hello_world " ) ;
15
15
Command :: new ( cargo_bin ( "scarb" ) )
16
16
. arg ( "build" )
17
17
. current_dir ( example. clone ( ) )
@@ -25,23 +25,23 @@ fn cairo_test_success() {
25
25
. assert ( )
26
26
. success ( )
27
27
. stdout_matches ( indoc ! { r#"
28
- running cairo_run_example ...
29
- Compiling cairo_run_example v0.1.0 ([..]/Scarb.toml)
28
+ running hello_world ...
29
+ Compiling hello_world v0.1.0 ([..]/Scarb.toml)
30
30
Finished release target(s) in [..]
31
- Run completed successfully, returning [2 ]
32
- Remaining gas: 1971340
31
+ Run completed successfully, returning [987 ]
32
+ Remaining gas: 1953640
33
33
"# } ) ;
34
34
}
35
35
36
36
#[ test]
37
- fn cairo_test_package_not_built ( ) {
37
+ fn package_not_built ( ) {
38
38
let example = manifest_dir ( )
39
39
. parent ( )
40
40
. unwrap ( )
41
41
. parent ( )
42
42
. unwrap ( )
43
43
. join ( "examples" )
44
- . join ( "cairo_run_example " ) ;
44
+ . join ( "hello_world " ) ;
45
45
Command :: new ( cargo_bin ( "scarb" ) )
46
46
. arg ( "clean" )
47
47
. current_dir ( example. clone ( ) )
@@ -55,10 +55,10 @@ fn cairo_test_package_not_built() {
55
55
. assert ( )
56
56
. success ( )
57
57
. stdout_matches ( indoc ! { r#"
58
- running cairo_run_example ...
59
- Compiling cairo_run_example v0.1.0 ([..]/Scarb.toml)
58
+ running hello_world ...
59
+ Compiling hello_world v0.1.0 ([..]/Scarb.toml)
60
60
Finished release target(s) in [..]
61
- Run completed successfully, returning [2 ]
62
- Remaining gas: 1971340
61
+ Run completed successfully, returning [987 ]
62
+ Remaining gas: 1953640
63
63
"# } ) ;
64
64
}
0 commit comments