Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

change JSON tests to use new API

  • Loading branch information...
commit cf6d1a8cdf02ba1b9988153e01286c9e8db50420 1 parent e410b68
Gerd Pokorra authored
Showing with 6 additions and 10 deletions.
  1. +6 −10 t/compilers/data_json/to_parrot.t
View
16 t/compilers/data_json/to_parrot.t
@@ -690,13 +690,11 @@ sub json_dump_is {
return pir_output_is( <<"END_PIR", $dumped, $reason, %args );
.sub test :main
- load_language 'data_json'
+ load_language 'JSON'
load_bytecode 'dumper.pbc'
- .local pmc JSON, eval, result
- JSON = compreg 'data_json'
- eval = JSON.'compile'("$code")
- result = eval()
+ .local pmc result
+ result = from_json("$code")
_dumper(result, "JSON")
.end
END_PIR
@@ -712,13 +710,11 @@ sub json_isnt {
return pir_error_output_like( <<"END_PIR", qr/not a valid JSON value/, $reason, %args );
.sub test :main
- load_language 'data_json'
+ load_language 'JSON'
- .local pmc JSON, eval, result
+ .local pmc result
- JSON = compreg 'data_json'
- eval = JSON.'compile'("$code")
- result = eval()
+ result = from_json("$code")
.end
END_PIR
Please sign in to comment.
Something went wrong with that request. Please try again.