File tree 2 files changed +7
-4
lines changed
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -23,3 +23,4 @@ erased-serde = "0.3"
23
23
erlust = { path = " ../erlust" }
24
24
serde = " 1.0"
25
25
serde_derive = " 1.0"
26
+ tokio = { version = " 0.1" , features = [" async-await-preview" ] }
Original file line number Diff line number Diff line change 4
4
extern crate erlust_derive;
5
5
#[ macro_use]
6
6
extern crate serde_derive;
7
+ #[ macro_use]
8
+ extern crate tokio;
7
9
8
10
use erlust_derive:: receive;
9
11
@@ -35,10 +37,10 @@ fn quux(x: usize) -> String {
35
37
format ! ( "{}" , x)
36
38
}
37
39
38
- // TODO: (B) this example is actually stupid, its name refers to the macro
40
+ // TODO: (B) make this example actually test both sending and receiving
39
41
#[ test]
40
- fn non_stupid ( ) {
41
- async {
42
+ fn passes_one_message ( ) {
43
+ tokio :: run_async ( async {
42
44
assert_eq ! (
43
45
"test" ,
44
46
receive!(
@@ -47,7 +49,7 @@ fn non_stupid() {
47
49
Bar : ( _pid, Bar ( x) ) if baz( * x) => quux( x) ,
48
50
)
49
51
) ;
50
- } ;
52
+ } ) ;
51
53
}
52
54
53
55
#[ derive( Deserialize , Message , Serialize ) ]
You can’t perform that action at this time.
0 commit comments