# New Ticket Created by  Colin Kuskie 
# Please include the string:  [perl #45219]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=45219 >


Convert Class to 'Class' in t/pmc/*.t.

Three tests were marked as TODO because they require an opcode that
takes a stringy class versus a bare class.

Index: t/pmc/boolean.t
===================================================================
--- t/pmc/boolean.t	(revision 21102)
+++ t/pmc/boolean.t	(working copy)
@@ -269,7 +269,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new Boolean
+    pmc1 = new 'Boolean'
     .local int bool1
     does bool1, pmc1, "scalar"
     print bool1
Index: t/pmc/timer.t
===================================================================
--- t/pmc/timer.t	(revision 21102)
+++ t/pmc/timer.t	(working copy)
@@ -253,7 +253,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new Timer
+    pmc1 = new 'Timer'
     .local int bool1
     does bool1, pmc1, "scalar"
     print bool1
Index: t/pmc/fixedstringarray.t
===================================================================
--- t/pmc/fixedstringarray.t	(revision 21102)
+++ t/pmc/fixedstringarray.t	(working copy)
@@ -271,7 +271,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new FixedStringArray
+    pmc1 = new 'FixedStringArray'
     .local int bool1
     does bool1, pmc1, "scalar"
     print bool1
Index: t/pmc/eval.t
===================================================================
--- t/pmc/eval.t	(revision 21102)
+++ t/pmc/eval.t	(working copy)
@@ -119,7 +119,7 @@
 pir_output_is( <<'CODE', <<'OUTPUT', "bug #31467" );
 
   .sub main :main
-     $P1 = new Hash
+     $P1 = new 'Hash'
      $P0 = find_name "_builtin"
      $P1['builtin'] = $P0
 
@@ -202,7 +202,7 @@
 
 .sub register_compiler
  .local pmc counter
- counter = new Integer
+ counter = new 'Integer'
  counter = 0
  store_global "counter", counter
 
Index: t/pmc/fixedintegerarray.t
===================================================================
--- t/pmc/fixedintegerarray.t	(revision 21102)
+++ t/pmc/fixedintegerarray.t	(working copy)
@@ -293,7 +293,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new FixedIntegerArray
+    pmc1 = new 'FixedIntegerArray'
     .local int bool1
     does bool1, pmc1, "scalar"
     print bool1
@@ -312,8 +312,11 @@
 0
 OUTPUT
 
+TODO: {
+    local $TODO = 'These tests require an obscure opcode that does not exist';
+
 pasm_output_is( <<'CODE', <<'OUTPUT', "new_p_i_s" );
-    new P0, .FixedIntegerArray, "(1, 17,42,0,77,0b111,    0Xff)"
+    new P0, 'FixedIntegerArray', "(1, 17,42,0,77,0b111,    0Xff)"
     set I0, P0
     print I0
     print "\n"
@@ -340,7 +343,7 @@
 
 pir_output_is( <<'CODE', <<'OUTPUT', "get_repr" );
 .sub main
-    new $P0, .FixedIntegerArray, "(1, 17,42,0,77,0b111,    0Xff)"
+    new $P0, 'FixedIntegerArray', "(1, 17,42,0,77,0b111,    0Xff)"
     set $I0, $P0
     print $I0
     print "\n"
@@ -352,6 +355,7 @@
 7
 [ 1, 17, 42, 0, 77, 7, 255 ]
 OUTPUT
+}
 
 1;
 
Index: t/pmc/array.t
===================================================================
--- t/pmc/array.t	(revision 21102)
+++ t/pmc/array.t	(working copy)
@@ -444,7 +444,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new Array
+    pmc1 = new 'Array'
     .local int bool1
     does bool1, pmc1, "scalar"
     print bool1
Index: t/pmc/resizableintegerarray.t
===================================================================
--- t/pmc/resizableintegerarray.t	(revision 21102)
+++ t/pmc/resizableintegerarray.t	(working copy)
@@ -275,7 +275,7 @@
 
 .sub test :main
     .local pmc pmc1
-    pmc1 = new ResizableIntegerArray
+    pmc1 = new 'ResizableIntegerArray'
     .local int bool1
     does bool1, pmc1, "scalar"
     print bool1
@@ -298,7 +298,7 @@
 
 .sub test :main
     .local pmc pmc1
-    pmc1 = new ResizableIntegerArray
+    pmc1 = new 'ResizableIntegerArray'
     pmc1[9999] = 0
     push pmc1, 10001
     .local int elements
@@ -396,7 +396,7 @@
 pir_output_is( << 'CODE', << 'OUTPUT', "shift integer" );
 .sub test :main
     .local pmc ar
-    ar = new ResizableIntegerArray
+    ar = new 'ResizableIntegerArray'
     ar[0] = 10
     ar[1] = 20
     $I0 = elements ar
@@ -422,7 +422,7 @@
 pir_output_is( << 'CODE', << 'OUTPUT', "unshift integer" );
 .sub test :main
     .local pmc ar
-    ar = new ResizableIntegerArray
+    ar = new 'ResizableIntegerArray'
     unshift ar, 10
     unshift ar, 20
     $I0 = elements ar
Index: t/pmc/sarray.t
===================================================================
--- t/pmc/sarray.t	(revision 21102)
+++ t/pmc/sarray.t	(working copy)
@@ -478,7 +478,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new SArray
+    pmc1 = new 'SArray'
     .local int bool1
     does bool1, pmc1, "scalar"
     print bool1
Index: t/pmc/scalar.t
===================================================================
--- t/pmc/scalar.t	(revision 21102)
+++ t/pmc/scalar.t	(working copy)
@@ -25,7 +25,7 @@
 
 pir_output_is( <<'CODE', <<'OUT', 'new', todo => 'not yet working' );
 .sub 'test' :main
-    new P0, .scalar
+    new P0, 'scalar'
     print "ok 1\n"
 .end
 CODE
Index: t/pmc/resizablefloatarray.t
===================================================================
--- t/pmc/resizablefloatarray.t	(revision 21102)
+++ t/pmc/resizablefloatarray.t	(working copy)
@@ -415,7 +415,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new ResizableFloatArray
+    pmc1 = new 'ResizableFloatArray'
     .local int bool1
     does bool1, pmc1, "scalar"
     print bool1
@@ -438,7 +438,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new ResizableFloatArray
+    pmc1 = new 'ResizableFloatArray'
     pmc1[9999] = 10000.10000
     push pmc1, 123.123
     .local int elements
@@ -459,7 +459,7 @@
 pir_output_is( << 'CODE', << 'OUTPUT', "shift float" );
 .sub test :main
     .local pmc ar
-    ar = new ResizableFloatArray
+    ar = new 'ResizableFloatArray'
     ar[0] = 10.1
     ar[1] = 20.2
     $I0 = elements ar
@@ -485,7 +485,7 @@
 pir_output_is( << 'CODE', << 'OUTPUT', "unshift float" );
 .sub test :main
     .local pmc ar
-    ar = new ResizableFloatArray
+    ar = new 'ResizableFloatArray'
     unshift ar, 10.1
     unshift ar, 20.2
     $I0 = elements ar
Index: t/pmc/coroutine.t
===================================================================
--- t/pmc/coroutine.t	(revision 21102)
+++ t/pmc/coroutine.t	(working copy)
@@ -82,7 +82,7 @@
 
 .pcc_sub _iterator
     .local object x
-    x = new Integer
+    x = new 'Integer'
     x = 0
     iloop:
         .pcc_begin_yield
@@ -271,7 +271,7 @@
 .end
 .sub coro
     .local pmc x
-    x = new Integer
+    x = new 'Integer'
     x = 0
     iloop:
         .yield (x)
@@ -298,7 +298,7 @@
 .end
 .sub coro
     .local pmc x
-    x = new Integer
+    x = new 'Integer'
     x = 0
     iloop:
         .yield (x)
@@ -319,7 +319,7 @@
 .end
 .sub coro
     .local pmc x
-    x = new Integer
+    x = new 'Integer'
     x = 0
     iloop:
         .yield (x)
@@ -334,7 +334,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new Coroutine
+    pmc1 = new 'Coroutine'
     .local int bool1
     does bool1, pmc1, "scalar"      # XXX WTF
     print bool1
Index: t/pmc/pmc.t
===================================================================
--- t/pmc/pmc.t	(revision 21102)
+++ t/pmc/pmc.t	(working copy)
@@ -354,8 +354,12 @@
 ok 3
 OUT
 
+TODO: {
+
+    local $TODO = 'This test requires an obscure opcode that does not exist with a stringy class';
+
 pasm_output_is( <<'CODE', <<'OUTPUT', "new_p_i_s" );
-    new P3, .Integer, "42"
+    new P3, 'Integer', "42"
     typeof S0, P3
     print S0
     print "\n"
@@ -368,6 +372,8 @@
 42
 OUTPUT
 
+}
+
 pasm_output_is( <<'CODE', <<'OUTPUT', "pmcinfo_i_p_ic" );
 .include "pmcinfo.pasm"
     new P0, 'Integer'
Index: t/pmc/orderedhash.t
===================================================================
--- t/pmc/orderedhash.t	(revision 21102)
+++ t/pmc/orderedhash.t	(working copy)
@@ -377,9 +377,9 @@
 
 .sub _main
     .local pmc hash1
-    hash1 = new OrderedHash
+    hash1 = new 'OrderedHash'
     .local pmc val_in
-    val_in = new String
+    val_in = new 'String'
     val_in = "U"
     hash1["X"] = val_in
 
@@ -398,7 +398,7 @@
 
 .sub _main
     .local pmc hash1
-    hash1 = new OrderedHash
+    hash1 = new 'OrderedHash'
     hash1["X"] = 14
 
     .local pmc val_out
@@ -416,7 +416,7 @@
 
 .sub _main
     .local pmc hash1
-    hash1 = new OrderedHash
+    hash1 = new 'OrderedHash'
     .local string val1
     val1 = 'U'
     set hash1["X"], val1
@@ -436,7 +436,7 @@
 
 .sub _main
     .local pmc hash1
-    hash1 = new OrderedHash
+    hash1 = new 'OrderedHash'
     hash1["X"] = '14'
 
     .local pmc val_out
@@ -455,7 +455,7 @@
 
 .sub _main
     .local pmc hash1
-    hash1 = new OrderedHash
+    hash1 = new 'OrderedHash'
     .local string key1
     key1 = 'X'
 
@@ -476,7 +476,7 @@
 
 .sub _main
     .local pmc hash1
-    hash1 = new OrderedHash
+    hash1 = new 'OrderedHash'
     .local string key1
     key1 = 'X'
 
@@ -497,7 +497,7 @@
 
 .sub _main
     .local pmc hash1
-    hash1 = new OrderedHash
+    hash1 = new 'OrderedHash'
 
     .local int hash_size
     hash_size = hash1
@@ -557,7 +557,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new OrderedHash
+    pmc1 = new 'OrderedHash'
     .local int bool1
     does bool1, pmc1, "scalar"
     print bool1
Index: t/pmc/multiarray.t
===================================================================
--- t/pmc/multiarray.t	(revision 21102)
+++ t/pmc/multiarray.t	(working copy)
@@ -200,7 +200,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new MultiArray
+    pmc1 = new 'MultiArray'
     .local int bool1
     does bool1, pmc1, "scalar"
     print bool1
Index: t/pmc/fixedbooleanarray.t
===================================================================
--- t/pmc/fixedbooleanarray.t	(revision 21102)
+++ t/pmc/fixedbooleanarray.t	(working copy)
@@ -271,7 +271,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new FixedBooleanArray
+    pmc1 = new 'FixedBooleanArray'
     .local int bool1
     does bool1, pmc1, "scalar"
     print bool1
Index: t/pmc/undef.t
===================================================================
--- t/pmc/undef.t	(revision 21102)
+++ t/pmc/undef.t	(working copy)
@@ -38,7 +38,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new Undef
+    pmc1 = new 'Undef'
     print "A PMC Undef created by new is"
     if pmc1 goto PMC1_IS
       print " not"
@@ -54,7 +54,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new Undef
+    pmc1 = new 'Undef'
     .local int is_defined
     is_defined = defined pmc1
     print "A PMC Undef is"
@@ -72,7 +72,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new Undef
+    pmc1 = new 'Undef'
     print "before"
     print pmc1
     print "after\n"
@@ -86,7 +86,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new Undef
+    pmc1 = new 'Undef'
     .local int int1
     int1 = pmc1
     .local int int2
@@ -104,7 +104,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new Undef
+    pmc1 = new 'Undef'
     .local int int1
     int1 = pmc1
     .local num float1
@@ -122,7 +122,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new Undef
+    pmc1 = new 'Undef'
     .local int int1
     int1 = pmc1
     .local num float1
@@ -140,7 +140,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new Undef
+    pmc1 = new 'Undef'
     pmc1 = -88888888
     print pmc1
     print "\n"
@@ -164,7 +164,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new Undef
+    pmc1 = new 'Undef'
     .local int pmc1_is_a
 
     pmc1_is_a = isa pmc1, "Undef"
@@ -216,7 +216,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new Undef
+    pmc1 = new 'Undef'
     .local int bool1
     does bool1, pmc1, "scalar"
     print bool1
@@ -234,7 +234,7 @@
 pir_output_is( << 'CODE', << 'OUTPUT', "verify clone works." );
 
 .sub _main
-    $P1 = new Undef
+    $P1 = new 'Undef'
     $P2 = clone $P1
     $S0 = typeof $P2
     print $S0
@@ -247,8 +247,8 @@
 pir_output_is( << 'CODE', << 'OUTPUT', "Undef == Undef (RT#33603)" );
 
 .sub _main
-    $P1 = new Undef
-    $P2 = new Undef
+    $P1 = new 'Undef'
+    $P2 = new 'Undef'
     if $P1 == $P2 goto ok
     print "not "
   ok:
Index: t/pmc/float.t
===================================================================
--- t/pmc/float.t	(revision 21102)
+++ t/pmc/float.t	(working copy)
@@ -177,10 +177,10 @@
 
 pir_output_is( <<'CODE', <<OUTPUT, "divide by zero" );
 .sub _main :main
-    P0 = new Float
+    P0 = new 'Float'
     set P0, "12.0"
-    P1 = new Float
-    P2 = new Float
+    P1 = new 'Float'
+    P2 = new 'Float'
     set P2, "0.0"
     push_eh OK
     P1 = P0 / P2
@@ -201,7 +201,7 @@
 
 .sub _main
     .local pmc float_1
-    float_1 = new Float
+    float_1 = new 'Float'
     float_1 = 123.123
     print float_1
     if float_1 goto IS_TRUE
@@ -219,7 +219,7 @@
 
 .sub _main
     .local pmc float_1
-    float_1 = new Float
+    float_1 = new 'Float'
     float_1 = -123.123
     print float_1
     if float_1 goto IS_TRUE
@@ -237,7 +237,7 @@
 
 .sub _main
     .local pmc float_1
-    float_1 = new Float
+    float_1 = new 'Float'
     float_1 = 1
     print float_1
     if float_1 goto IS_TRUE
@@ -255,7 +255,7 @@
 
 .sub _main
     .local pmc float_1
-    float_1 = new Float
+    float_1 = new 'Float'
     float_1 = -1
     print float_1
     if float_1 goto IS_TRUE
@@ -273,7 +273,7 @@
 
 .sub _main
     .local pmc float_1
-    float_1 = new Float
+    float_1 = new 'Float'
     float_1 = 0
     print float_1
     if float_1 goto IS_TRUE
@@ -291,7 +291,7 @@
 
 .sub _main
     .local pmc float_1
-    float_1 = new Float
+    float_1 = new 'Float'
     float_1 = 0.000
     print float_1
     if float_1 goto IS_TRUE
@@ -613,7 +613,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new Float
+    pmc1 = new 'Float'
     .local int bool1
     does bool1, pmc1, "scalar"
     print bool1
Index: t/pmc/object-meths.t
===================================================================
--- t/pmc/object-meths.t	(revision 21102)
+++ t/pmc/object-meths.t	(working copy)
@@ -1345,7 +1345,7 @@
     .local pmc cl, o
     cl = newclass 'MyClass'
     o = new 'MyClass'
-    $P2 = new String
+    $P2 = new 'String'
     $P2 = "blue"
     setattribute o, 0, $P2
     setattribute o, "blue", $P2
Index: t/pmc/env.t
===================================================================
--- t/pmc/env.t	(revision 21102)
+++ t/pmc/env.t	(working copy)
@@ -146,7 +146,7 @@
 
 .sub main
     .local pmc pmc1
-    pmc1 = new Env
+    pmc1 = new 'Env'
     .local int bool1
 
     does bool1, pmc1, "hash"
@@ -173,7 +173,7 @@
     .local int num_before, num_after, num_diff
 
     # add three more keys in env
-    env = new Env
+    env = new 'Env'
     num_before = env
     env["PARROT_TMP_ADD_1"] = "tmp_add_1"
     env["PARROT_TMP_ADD_2"] = "tmp_add_2"
@@ -194,7 +194,7 @@
     .local num num_before, num_after, num_diff
 
     # add three more keys in env
-    env = new Env
+    env = new 'Env'
     num_before = env
     env["PARROT_TMP_ADD_1"] = "tmp_add_1"
     env["PARROT_TMP_ADD_2"] = "tmp_add_2"
Index: t/pmc/managedstruct.t
===================================================================
--- t/pmc/managedstruct.t	(revision 21102)
+++ t/pmc/managedstruct.t	(working copy)
@@ -246,7 +246,7 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new ManagedStruct
+    pmc1 = new 'ManagedStruct'
     .local int bool1
     does bool1, pmc1, "scalar"
     print bool1
Index: t/pmc/closure.t
===================================================================
--- t/pmc/closure.t	(revision 21102)
+++ t/pmc/closure.t	(working copy)
@@ -38,7 +38,7 @@
 ## had ever been called.
 .sub _test_1 :main
     .lex "X", $P40
-    $P40 = new Integer
+    $P40 = new 'Integer'
     $P40 = 22
     .const .Sub $P43 = "___internal_test_1_0_"
     newclosure $P44, $P43
Index: t/pmc/ref.t
===================================================================
--- t/pmc/ref.t	(revision 21102)
+++ t/pmc/ref.t	(working copy)
@@ -165,11 +165,11 @@
 
 .sub _main
     .local pmc pmc1
-    pmc1 = new Array
+    pmc1 = new 'Array'
     .local pmc pmc2
-    pmc2 = new Ref, pmc1
+    pmc2 = new 'Ref', pmc1
     .local pmc pmc3
-    pmc3 = new SharedRef, pmc1
+    pmc3 = new 'SharedRef', pmc1
     .local int bool1
     does bool1, pmc2, "scalar"
     print bool1

Reply via email to