File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
stackslib/src/clarity_vm/tests Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -271,8 +271,27 @@ fn test_emit_stx_burn_nok() {
271
271
assert ! ( events. is_empty( ) ) ;
272
272
}
273
273
274
+ #[ cfg( not( feature = "clarity-wasm" ) ) ]
274
275
#[ test]
275
276
fn test_emit_nested_print_nok ( ) {
277
+ let contract = "(define-public (emit-event-nok)
278
+ (begin
279
+ (print \" bar\" )
280
+ (err u1)))
281
+ (define-public (emit-event-ok)
282
+ (begin
283
+ (emit-event-nok)
284
+ (print \" foo\" )
285
+ (ok u1)))" ;
286
+
287
+ let ( value, events) = helper_execute ( contract, "emit-event-ok" ) ;
288
+ assert_eq ! ( value, Value :: okay( Value :: UInt ( 1 ) ) . unwrap( ) ) ;
289
+ assert_eq ! ( events. len( ) , 1 ) ;
290
+ }
291
+
292
+ #[ cfg( feature = "clarity-wasm" ) ]
293
+ #[ test]
294
+ fn test_emit_nested_print_nok_wasm ( ) {
276
295
let contract = "(define-public (emit-event-nok)
277
296
(begin
278
297
(print \" bar\" )
You can’t perform that action at this time.
0 commit comments