On Thu, 12 Jul 2007 09:26:25 -0700
Mark Glines <[EMAIL PROTECTED]> wrote:
> I don't have a fix (yet), but here's a patch to add a couple of tests
> for it.  One test makes sure it emits the right #line when a complex
> pmclass statement is all on one line, and the second makes sure #line
> is adjusted when pmclass *isn't* on the same line.
> 
> The first test succeeds, the second one fails.


Ever get the feeling you're just talking to yourself?  I do.

Andy's r19845 changes changed the generated .c output slightly, which
broke the tests I had added.  Here is an updated patch to
t/tools/pmc2c.t, to make them pass again.

Mark
=== t/tools/pmc2c.t
==================================================================
--- t/tools/pmc2c.t	(revision 21481)
+++ t/tools/pmc2c.t	(local)
@@ -28,7 +28,7 @@
 
 use Fatal qw{open close};
 use Test::More;
-use Parrot::Test tests => 11;
+use Parrot::Test tests => 13;
 use Parrot::Config;
 
 my $pmc2c = join $PConfig{slash}, qw(. tools build pmc2c.pl);
@@ -181,6 +181,28 @@
                 );
 END_C
 
+pmc2c_output_like( <<'END_PMC', <<'END_C', 'maps' );
+pmclass a hll dale maps Integer {
+    void init() {
+    }
+}
+END_PMC
+Parrot_a_init(PARROT_INTERP, PMC *pmc)
+#line 2
+END_C
+
+pmc2c_output_like( <<'END_PMC', <<'END_C', 'maps' );
+pmclass a
+    hll dale
+    maps Integer {
+    void init() {
+    }
+}
+END_PMC
+Parrot_a_init(PARROT_INTERP, PMC *pmc)
+#line 4
+END_C
+
 # Local Variables:
 #   mode: cperl
 #   cperl-indent-level: 4

Reply via email to