[svn:parrot] r45919 - trunk/t/library

coke at svn.parrot.org coke at svn.parrot.org
Thu Apr 22 19:10:13 UTC 2010


Author: coke
Date: Thu Apr 22 19:10:12 2010
New Revision: 45919
URL: https://trac.parrot.org/parrot/changeset/45919

Log:
Avoid deprecated JSON compiler.

Modified:
   trunk/t/library/mime_base64.t

Modified: trunk/t/library/mime_base64.t
==============================================================================
--- trunk/t/library/mime_base64.t	Thu Apr 22 18:44:04 2010	(r45918)
+++ trunk/t/library/mime_base64.t	Thu Apr 22 19:10:12 2010	(r45919)
@@ -23,7 +23,7 @@
     load_bytecode 'MIME/Base64.pbc'
     load_bytecode 'PGE.pbc'
     load_bytecode 'PGE/Util.pbc'
-    load_bytecode 'compilers/json/JSON.pbc'
+    load_bytecode 'data_json.pbc'
 
     .local pmc plan, is, ok
     plan = get_hll_global [ 'Test'; 'More' ], 'plan'
@@ -32,11 +32,11 @@
 
     plan(550)
 
-    .local pmc JSON
-    JSON = compreg "JSON"
+    .local pmc json
+    json = compreg 'data_json'
 
     .local pmc encode_decode_tests, decode_tests
-    encode_decode_tests = JSON( <<'END_JSON' )
+    encode_decode_tests = json.'compile'( <<'END_JSON' )
 [ ["Hello, World!\n","SGVsbG8sIFdvcmxkIQo="],
   ["\u0000","AA=="],
   ["\u0001","AQ=="],
@@ -310,7 +310,7 @@
 ]
 END_JSON
 
-    decode_tests = JSON( <<'END_JSON' )
+    decode_tests = json.'compile'( <<'END_JSON' )
 [ ["YWE=","aa"],
   [" YWE=","aa"],
   ["Y WE=","aa"],
@@ -333,6 +333,7 @@
     .local pmc test_iterator, test_case
     .local string plain, base64, comment, comment_cnt
 
+    encode_decode_tests = encode_decode_tests()
     test_iterator = iter encode_decode_tests
     enc_dec_loop:
         unless test_iterator goto enc_dec_loop_end
@@ -351,6 +352,7 @@
     goto enc_dec_loop
     enc_dec_loop_end:
 
+    decode_tests = decode_tests()
     test_iterator = iter decode_tests
     dec_loop:
         unless test_iterator goto dec_loop_end


More information about the parrot-commits mailing list