[svn:parrot] r46577 - branches/ops_pct/t/compilers/opsc

cotto at svn.parrot.org cotto at svn.parrot.org
Thu May 13 08:26:47 UTC 2010


Author: cotto
Date: Thu May 13 08:26:47 2010
New Revision: 46577
URL: https://trac.parrot.org/parrot/changeset/46577

Log:
[opsc] check exact number of ops parsed, use installed opsc.pbc, be explicit about testing core ops

Modified:
   branches/ops_pct/t/compilers/opsc/01-parse.t
   branches/ops_pct/t/compilers/opsc/02-parse-all-ops.t
   branches/ops_pct/t/compilers/opsc/03-past.t
   branches/ops_pct/t/compilers/opsc/04-op.t
   branches/ops_pct/t/compilers/opsc/05-oplib.t
   branches/ops_pct/t/compilers/opsc/06-opsfile.t
   branches/ops_pct/t/compilers/opsc/07-emitter.t

Modified: branches/ops_pct/t/compilers/opsc/01-parse.t
==============================================================================
--- branches/ops_pct/t/compilers/opsc/01-parse.t	Thu May 13 08:12:23 2010	(r46576)
+++ branches/ops_pct/t/compilers/opsc/01-parse.t	Thu May 13 08:26:47 2010	(r46577)
@@ -7,7 +7,7 @@
 .sub 'main' :main
 
     .include 'test_more.pir'
-    load_bytecode 'compilers/opsc/opsc.pbc'
+    load_bytecode 'opsc.pbc'
 
     plan(12)
 

Modified: branches/ops_pct/t/compilers/opsc/02-parse-all-ops.t
==============================================================================
--- branches/ops_pct/t/compilers/opsc/02-parse-all-ops.t	Thu May 13 08:12:23 2010	(r46576)
+++ branches/ops_pct/t/compilers/opsc/02-parse-all-ops.t	Thu May 13 08:26:47 2010	(r46577)
@@ -6,7 +6,7 @@
 
 .sub 'main' :main
     .include 'test_more.pir'
-    load_bytecode 'compilers/opsc/opsc.pbc'
+    load_bytecode 'opsc.pbc'
 
     .local int total
     .local pmc os, all_files, ops_files, dynops_files

Modified: branches/ops_pct/t/compilers/opsc/03-past.t
==============================================================================
--- branches/ops_pct/t/compilers/opsc/03-past.t	Thu May 13 08:12:23 2010	(r46576)
+++ branches/ops_pct/t/compilers/opsc/03-past.t	Thu May 13 08:26:47 2010	(r46577)
@@ -6,7 +6,7 @@
 # "Comprehensive" test for creating PAST for op.
 # Parse single op and check various aspects of created PAST.
 
-pir::load_bytecode('compilers/opsc/opsc.pbc');
+pir::load_bytecode('opsc.pbc');
 pir::load_bytecode('nqp-settings.pbc');
 pir::load_bytecode('dumper.pbc');
 
@@ -28,7 +28,6 @@
 }
 
 |;
-
 my $compiler := pir::compreg__Ps('Ops');
 
 my $past := $compiler.compile($buf, target => 'past');
@@ -41,7 +40,7 @@
 
 my @ops := @($past<ops>);
 # One "bar" and two "foo"
-ok(+ at ops == 3, 'We have 2 ops');
+ok(+ at ops ==  3, 'We have 3 ops');
 
 my $op := @ops[1];
 ok($op.name == 'foo', "Name parsed");

Modified: branches/ops_pct/t/compilers/opsc/04-op.t
==============================================================================
--- branches/ops_pct/t/compilers/opsc/04-op.t	Thu May 13 08:12:23 2010	(r46576)
+++ branches/ops_pct/t/compilers/opsc/04-op.t	Thu May 13 08:26:47 2010	(r46577)
@@ -4,7 +4,7 @@
 
 # Checking Ops::Op
 
-pir::load_bytecode("compilers/opsc/opsc.pbc");
+pir::load_bytecode("opsc.pbc");
 pir::load_bytecode("nqp-settings.pbc");
 
 plan(7);

Modified: branches/ops_pct/t/compilers/opsc/05-oplib.t
==============================================================================
--- branches/ops_pct/t/compilers/opsc/05-oplib.t	Thu May 13 08:12:23 2010	(r46576)
+++ branches/ops_pct/t/compilers/opsc/05-oplib.t	Thu May 13 08:26:47 2010	(r46577)
@@ -4,7 +4,7 @@
 
 # Checking for OpLib num and skip files parsing.
 
-pir::load_bytecode("compilers/opsc/opsc.pbc");
+pir::load_bytecode("opsc.pbc");
 
 plan(5);
 

Modified: branches/ops_pct/t/compilers/opsc/06-opsfile.t
==============================================================================
--- branches/ops_pct/t/compilers/opsc/06-opsfile.t	Thu May 13 08:12:23 2010	(r46576)
+++ branches/ops_pct/t/compilers/opsc/06-opsfile.t	Thu May 13 08:26:47 2010	(r46577)
@@ -2,7 +2,7 @@
 # Copyright (C) 2010, Parrot Foundation.
 # $Id$
 
-pir::load_bytecode("compilers/opsc/opsc.pbc");
+pir::load_bytecode("opsc.pbc");
 pir::load_bytecode("nqp-settings.pbc");
 
 plan(7);
@@ -13,7 +13,7 @@
     src/ops/math.ops
 >;
 
-my $f := Ops::File.new(:oplib($oplib), |@files);
+my $f := Ops::File.new(:oplib($oplib), |@files, :core(1));
 
 my @ops := $f.ops;
 # 84 core
@@ -22,7 +22,7 @@
 say( "# Parsed " ~ + at ops);
 # There is more than 300 ops in this 2 files.
 # Feel free to update number if you change them.
-ok(+ at ops > 300, "Ops parsed correctly");
+ok(+ at ops == 314, "Ops parsed correctly");
 
 my $op := @ops[0];
 #_dumper($op);

Modified: branches/ops_pct/t/compilers/opsc/07-emitter.t
==============================================================================
--- branches/ops_pct/t/compilers/opsc/07-emitter.t	Thu May 13 08:12:23 2010	(r46576)
+++ branches/ops_pct/t/compilers/opsc/07-emitter.t	Thu May 13 08:26:47 2010	(r46577)
@@ -2,7 +2,7 @@
 # Copyright (C) 2010, Parrot Foundation.
 # $Id$
 
-pir::load_bytecode("compilers/opsc/opsc.pbc");
+pir::load_bytecode("opsc.pbc");
 pir::load_bytecode("nqp-settings.pbc");
 
 plan(22);
@@ -19,6 +19,7 @@
 my $emitter := Ops::Emitter.new(
     :ops_file(Ops::File.new(
         :oplib($lib),
+        :core(1),
         |@files)
     ),
     :trans($trans),


More information about the parrot-commits mailing list