[svn:parrot] r38431 - branches/pmc_pct/compilers/pmc/t

bacek at svn.parrot.org bacek at svn.parrot.org
Fri May 1 23:11:18 UTC 2009


Author: bacek
Date: Fri May  1 23:11:18 2009
New Revision: 38431
URL: https://trac.parrot.org/parrot/changeset/38431

Log:
Reorder tests.

Added:
   branches/pmc_pct/compilers/pmc/t/04-vtable-info.t
      - copied, changed from r38430, branches/pmc_pct/compilers/pmc/t/05-vtable-info.t
   branches/pmc_pct/compilers/pmc/t/05-header.t
      - copied, changed from r38430, branches/pmc_pct/compilers/pmc/t/04-header.t
Deleted:
   branches/pmc_pct/compilers/pmc/t/04-header.t
   branches/pmc_pct/compilers/pmc/t/05-vtable-info.t

Deleted: branches/pmc_pct/compilers/pmc/t/04-header.t
==============================================================================
--- branches/pmc_pct/compilers/pmc/t/04-header.t	Fri May  1 23:11:18 2009	(r38430)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,54 +0,0 @@
-#! ../../parrot
-# Check generating header for parsed PMC
-
-.include 't/common.pir'
-
-.sub 'main' :main
-.include 'test_more.pir'
-load_bytecode 'pmc.pbc'
-    .local int total
-
-    plan(3)
-
-    .local string filename
-    filename = 't/data/class00.pmc'
-    $S0 = _slurp(filename)
-    check_one_header(filename, $S0, "'DO NOT EDIT THIS FILE'", "Warning generated")
-
-    check_one_header(filename, $S0, "'PARROT_PMC_FOO_H_GUARD'", "Guard generated")
-
-    filename = 't/data/class07.pmc'
-    $S0 = _slurp(filename)
-    check_one_header(filename, $S0, "'PMC * Parrot_Integer_instantiate(PARROT_INTERP, PMC *sig, PMC* init)'", "VTable method generated")
-
-.end
-
-# Check genrated header.
-# Parse passed string, generate header, check against supplied pattern
-.sub 'check_one_header'
-    .param string name
-    .param string source
-    .param string pattern
-    .param string message
-
-    .local pmc compiler
-    compiler = compreg 'PMC'
-    $P0 = compiler.'compile'(source, 'target'=>'past')
-
-    .local pmc emitter
-    $P1 = split '::', 'PMC::Emitter'
-    emitter = new $P1
-    emitter.'set_filename'(name)
-    $S0 = emitter.'generate_h_file'($P0)
-    say $S0
-    like($S0, pattern, message)
-.end
-
-# Don't forget to update plan!
-
-# Local Variables:
-#   mode: cperl
-#   cperl-indent-level: 4
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4 ft=pir:

Copied and modified: branches/pmc_pct/compilers/pmc/t/04-vtable-info.t (from r38430, branches/pmc_pct/compilers/pmc/t/05-vtable-info.t)
==============================================================================

Copied and modified: branches/pmc_pct/compilers/pmc/t/05-header.t (from r38430, branches/pmc_pct/compilers/pmc/t/04-header.t)
==============================================================================

Deleted: branches/pmc_pct/compilers/pmc/t/05-vtable-info.t
==============================================================================
--- branches/pmc_pct/compilers/pmc/t/05-vtable-info.t	Fri May  1 23:11:18 2009	(r38430)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,33 +0,0 @@
-#! ../../parrot
-
-# Test that vtables initialised properly.
-
-.sub 'main' :main
-.include 'test_more.pir'
-    load_bytecode 'compilers/pmc/pmc.pbc'
-
-    plan(2)
-
-    $P0 = get_hll_global ["PMC"; "VTableInfo"], 'vtable_list'
-    $P1 = $P0()
-
-    $I0 = elements $P1
-    ok($I0, "We've got some vtables in list")
-    
-    $P0 = get_hll_global ["PMC"; "VTableInfo"], 'vtable_hash'
-    $P1 = $P0()
-
-    $I0 = elements $P1
-    say $I0
-    ok($I0, "We've got some vtables in hash")
-.end
-
-
-# Don't forget to update plan!
-
-# Local Variables:
-#   mode: cperl
-#   cperl-indent-level: 4
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4 ft=pir:


More information about the parrot-commits mailing list