Author: chromatic
Date: Sat Mar 29 16:43:46 2008
New Revision: 26638

Modified:
   trunk/runtime/parrot/include/test_more.pir
   trunk/runtime/parrot/library/Test/Builder.pir
   trunk/runtime/parrot/library/Test/Builder/Output.pir
   trunk/runtime/parrot/library/Test/Builder/Test.pir
   trunk/runtime/parrot/library/Test/Builder/TestPlan.pir
   trunk/runtime/parrot/library/Test/Builder/Tester.pir
   trunk/t/library/cgi_query_hash.t
   trunk/t/library/test_builder_tester.t
   trunk/t/library/test_more.t

Log:
[Test::More] Converted more class names from string names to keyed names.

Modified: trunk/runtime/parrot/include/test_more.pir
==============================================================================
--- trunk/runtime/parrot/include/test_more.pir  (original)
+++ trunk/runtime/parrot/include/test_more.pir  Sat Mar 29 16:43:46 2008
@@ -29,4 +29,3 @@
 #   fill-column: 100
 # End:
 # vim: expandtab shiftwidth=4 ft=pir:
-

Modified: trunk/runtime/parrot/library/Test/Builder.pir
==============================================================================
--- trunk/runtime/parrot/library/Test/Builder.pir       (original)
+++ trunk/runtime/parrot/library/Test/Builder.pir       Sat Mar 29 16:43:46 2008
@@ -140,7 +140,7 @@
     if is_defined goto OUTPUT_DEFINED
 
     .local int output_class
-    output = new 'Test::Builder::Output'
+    output = new [ 'Test'; 'Builder'; 'Output' ]
 
   OUTPUT_DEFINED:
     is_defined = exists args['testplan']
@@ -196,7 +196,7 @@
     # create a Test::Builder::Output object
     .local pmc args_hash
     args_hash  = new 'Hash'
-    output     = new 'Test::Builder::Output', args_hash
+    output     = new [ 'Test'; 'Builder'; 'Output' ], args_hash
 
   OUTPUT_DEFINED:
     # now try in the args hash
@@ -301,7 +301,7 @@
     .local int is_equal
     .local int is_plan
 
-    is_plan = isa testplan, 'Test::Builder::TestPlan'
+    is_plan = isa testplan, [ 'Test'; 'Builder'; 'TestPlan' ]
     if is_plan == 1 goto CHECK_REPLAN
     eq_str testplan, 'global_testplan', SET_GLOBAL_TESTPLAN
     goto CHECK_REPLAN
@@ -312,7 +312,7 @@
 
   CHECK_REPLAN:
     .local int valid_tp
-    valid_tp = does testplan, 'Test::Builder::TestPlan'
+    valid_tp = does testplan, [ 'Test'; 'Builder'; 'TestPlan' ]
 
     unless valid_tp goto CHECK_TESTNUM
 
@@ -334,7 +334,7 @@
     args = new 'Hash'
     args['expect'] = num_tests
 
-    testplan = new 'Test::Builder::TestPlan', args
+    testplan = new [ 'Test'; 'Builder'; 'TestPlan' ], args
     goto FINISH_PLAN
 
   CHECK_EXPLANATION:
@@ -570,7 +570,7 @@
     testplan = self.'testplan'()
 
     .local int plan_ok
-    plan_ok = isa testplan, 'Test::Builder::TestPlan'
+    plan_ok = isa testplan, [ 'Test'; 'Builder'; 'TestPlan' ]
     if plan_ok goto CREATE_TEST
 
     .local pmc plan_exception
@@ -597,7 +597,7 @@
     push results, test
 
     .local pmc tbt_create
-    find_global tbt_create, 'Test::Builder::Test', 'create'
+    find_global tbt_create, [ 'Test'; 'Builder'; 'Test' ], 'create'
     test = tbt_create( test_args )
 
     .local pmc output

Modified: trunk/runtime/parrot/library/Test/Builder/Output.pir
==============================================================================
--- trunk/runtime/parrot/library/Test/Builder/Output.pir        (original)
+++ trunk/runtime/parrot/library/Test/Builder/Output.pir        Sat Mar 29 
16:43:46 2008
@@ -19,11 +19,11 @@
 
 =cut
 
-.namespace [ 'Test::Builder::Output' ]
+.namespace [ 'Test'; 'Builder'; 'Output' ]
 
 .sub _initialize :load
        .local pmc   tbo_class
-       newclass     tbo_class, 'Test::Builder::Output'
+       newclass     tbo_class, [ 'Test'; 'Builder'; 'Output' ]
        addattribute tbo_class, 'output'
        addattribute tbo_class, 'diag_output'
 .end

Modified: trunk/runtime/parrot/library/Test/Builder/Test.pir
==============================================================================
--- trunk/runtime/parrot/library/Test/Builder/Test.pir  (original)
+++ trunk/runtime/parrot/library/Test/Builder/Test.pir  Sat Mar 29 16:43:46 2008
@@ -14,7 +14,7 @@
 
 =cut
 
-.namespace [ 'Test::Builder::Test' ]
+.namespace [ 'Test'; 'Builder'; 'Test' ]
 
 .sub _initialize :load
     .local pmc tbtb_class

Modified: trunk/runtime/parrot/library/Test/Builder/TestPlan.pir
==============================================================================
--- trunk/runtime/parrot/library/Test/Builder/TestPlan.pir      (original)
+++ trunk/runtime/parrot/library/Test/Builder/TestPlan.pir      Sat Mar 29 
16:43:46 2008
@@ -23,11 +23,11 @@
 
 =cut
 
-.namespace [ 'Test::Builder::TestPlan' ]
+.namespace [ 'Test'; 'Builder'; 'TestPlan' ]
 
 .sub _initialize :load
     .local pmc tbtp_class
-    newclass     tbtp_class, 'Test::Builder::TestPlan'
+    newclass     tbtp_class, [ 'Test'; 'Builder'; 'TestPlan' ]
     addattribute tbtp_class, 'expect'
 
     # XXX - can't seem to do this within its own class

Modified: trunk/runtime/parrot/library/Test/Builder/Tester.pir
==============================================================================
--- trunk/runtime/parrot/library/Test/Builder/Tester.pir        (original)
+++ trunk/runtime/parrot/library/Test/Builder/Tester.pir        Sat Mar 29 
16:43:46 2008
@@ -15,10 +15,10 @@
     .local pmc test_diag
     .local pmc test_test
 
-    plan      = find_global 'Test::Builder::Tester', 'plan'
-    test_out  = find_global 'Test::Builder::Tester', 'test_out'
-    test_diag = find_global 'Test::Builder::Tester', 'test_diag'
-    test_test = find_global 'Test::Builder::Tester', 'test_test'
+    plan      = find_global [ 'Test'; 'Builder'; 'Tester' ], 'plan'
+    test_out  = find_global [ 'Test'; 'Builder'; 'Tester' ], 'test_out'
+    test_diag = find_global [ 'Test'; 'Builder'; 'Tester' ], 'test_diag'
+    test_test = find_global [ 'Test'; 'Builder'; 'Tester' ], 'test_test'
 
     # create a new Test::Builder object
     .local pmc tb_args
@@ -151,7 +151,7 @@
     .return( diag_string )
 .end
 
-.namespace [ 'Test::Builder::Tester' ]
+.namespace [ 'Test'; 'Builder'; 'Tester' ]
 
 .sub _initialize :load
     load_bytecode 'library/Test/Builder.pbc'
@@ -178,7 +178,7 @@
     tb_create   = find_global [ 'Test'; 'Builder' ], 'create'
 
     args        = new 'Hash'
-    output      = new 'Test::Builder::Output', args
+    output      = new [ 'Test'; 'Builder'; 'Output' ], args
     .local pmc results, testplan
     results    = new 'ResizablePMCArray'
     testplan   = new 'String'
@@ -190,11 +190,11 @@
     expect_out  = new 'ResizablePMCArray'
     expect_diag = new 'ResizablePMCArray'
 
-    store_global 'Test::Builder::Tester', '_test',         test
-    store_global 'Test::Builder::Tester', '_default_test', default_test
-    store_global 'Test::Builder::Tester', '_test_output',  test_output
-    store_global 'Test::Builder::Tester', '_expect_out',   expect_out
-    store_global 'Test::Builder::Tester', '_expect_diag',  expect_diag
+    store_global [ 'Test'; 'Builder'; 'Tester' ], '_test',         test
+    store_global [ 'Test'; 'Builder'; 'Tester' ], '_default_test', default_test
+    store_global [ 'Test'; 'Builder'; 'Tester' ], '_test_output',  test_output
+    store_global [ 'Test'; 'Builder'; 'Tester' ], '_expect_out',   expect_out
+    store_global [ 'Test'; 'Builder'; 'Tester' ], '_expect_diag',  expect_diag
 .end
 
 =item C<plan( num_tests )>
@@ -207,7 +207,7 @@
     .param int tests
 
     .local pmc test
-    test = find_global 'Test::Builder::Tester', '_test'
+    test = find_global [ 'Test'; 'Builder'; 'Tester' ], '_test'
 
     test.'plan'( tests )
 .end
@@ -250,7 +250,7 @@
     .local int result_count
     .local pmc next_result
 
-    test         = find_global 'Test::Builder::Tester', '_default_test'
+    test         = find_global [ 'Test'; 'Builder'; 'Tester' ], '_default_test'
     results      = test.'results'()
     result_count = results
     inc result_count
@@ -272,7 +272,7 @@
 
   SET_EXPECT_OUTPUT:
     .local pmc expect_out
-    expect_out = find_global 'Test::Builder::Tester', '_expect_out'
+    expect_out = find_global [ 'Test'; 'Builder'; 'Tester' ], '_expect_out'
 
     push expect_out, line_string
 .end
@@ -293,7 +293,7 @@
     set line_string, line
 
     .local pmc expect_out
-    expect_out = find_global 'Test::Builder::Tester', '_expect_out'
+    expect_out = find_global [ 'Test'; 'Builder'; 'Tester' ], '_expect_out'
 
     push expect_out, line_string
 .end
@@ -313,7 +313,7 @@
     set line_string, line
 
     .local pmc expect_diag
-    expect_diag = find_global 'Test::Builder::Tester', '_expect_diag'
+    expect_diag = find_global [ 'Test'; 'Builder'; 'Tester' ], '_expect_diag'
 
     push expect_diag, line_string
 .end
@@ -335,7 +335,7 @@
     set line_string, line
 
     .local pmc expect_diag
-    expect_diag = find_global 'Test::Builder::Tester', '_expect_diag'
+    expect_diag = find_global [ 'Test'; 'Builder'; 'Tester' ], '_expect_diag'
 
     push expect_diag, line_string
 .end
@@ -363,10 +363,10 @@
     .local pmc expect_diag
     .local pmc test_output
 
-    test          = find_global 'Test::Builder::Tester', '_test'
-    expect_out    = find_global 'Test::Builder::Tester', '_expect_out'
-    expect_diag   = find_global 'Test::Builder::Tester', '_expect_diag'
-    test_output   = find_global 'Test::Builder::Tester', '_test_output'
+    test          = find_global [ 'Test'; 'Builder'; 'Tester' ], '_test'
+    expect_out    = find_global [ 'Test'; 'Builder'; 'Tester' ], '_expect_out'
+    expect_diag   = find_global [ 'Test'; 'Builder'; 'Tester' ], '_expect_diag'
+    test_output   = find_global [ 'Test'; 'Builder'; 'Tester' ], '_test_output'
 
     .local string received_out_string
     .local string received_diag_string

Modified: trunk/t/library/cgi_query_hash.t
==============================================================================
--- trunk/t/library/cgi_query_hash.t    (original)
+++ trunk/t/library/cgi_query_hash.t    Sat Mar 29 16:43:46 2008
@@ -18,15 +18,10 @@
 .include "library/dumper.pir"
 
 .sub test :main
+    .include 'include/test_more.pir'
 
-    load_bytecode 'Test/More.pir'
     load_bytecode 'CGI/QueryHash.pbc'
 
-    .local pmc plan, is, ok
-    plan = get_hll_global [ 'Test'; 'More' ], 'plan'
-    is   = get_hll_global [ 'Test'; 'More' ], 'is'
-    ok   = get_hll_global [ 'Test'; 'More' ], 'ok'
-
     plan(7)
 
     .local int    is_defined

Modified: trunk/t/library/test_builder_tester.t
==============================================================================
--- trunk/t/library/test_builder_tester.t       (original)
+++ trunk/t/library/test_builder_tester.t       Sat Mar 29 16:43:46 2008
@@ -17,12 +17,12 @@
        .local pmc test_out
        .local pmc test_diag
        .local pmc test_test
-       plan      = get_global ['Test::Builder::Tester'], 'plan'
-       test_pass = get_global ['Test::Builder::Tester'], 'test_pass'
-       test_fail = get_global ['Test::Builder::Tester'], 'test_fail'
-       test_out  = get_global ['Test::Builder::Tester'], 'test_out'
-       test_diag = get_global ['Test::Builder::Tester'], 'test_diag'
-       test_test = get_global ['Test::Builder::Tester'], 'test_test'
+       plan      = get_global [ 'Test'; 'Builder'; 'Tester' ], 'plan'
+       test_pass = get_global [ 'Test'; 'Builder'; 'Tester' ], 'test_pass'
+       test_fail = get_global [ 'Test'; 'Builder'; 'Tester' ], 'test_fail'
+       test_out  = get_global [ 'Test'; 'Builder'; 'Tester' ], 'test_out'
+       test_diag = get_global [ 'Test'; 'Builder'; 'Tester' ], 'test_diag'
+       test_test = get_global [ 'Test'; 'Builder'; 'Tester' ], 'test_test'
 
        plan( 12 )
 

Modified: trunk/t/library/test_more.t
==============================================================================
--- trunk/t/library/test_more.t (original)
+++ trunk/t/library/test_more.t Sat Mar 29 16:43:46 2008
@@ -18,7 +18,7 @@
        exports = split " ", "ok is diag like skip todo is_deeply isa_ok"
        test_namespace.export_to(curr_namespace, exports)
 
-       test_namespace = get_namespace [ "Test::Builder::Tester" ]
+       test_namespace = get_namespace [ 'Test'; 'Builder'; 'Tester' ]
        exports = split " ", "plan test_out test_diag test_fail test_pass 
test_test"
        test_namespace.export_to(curr_namespace, exports)
 

Reply via email to