[svn:parrot] r41565 - in trunk: . t/tools
darbelo at svn.parrot.org
darbelo at svn.parrot.org
Tue Sep 29 22:46:47 UTC 2009
Author: darbelo
Date: Tue Sep 29 22:46:47 2009
New Revision: 41565
URL: https://trac.parrot.org/parrot/changeset/41565
Log:
Remove t/tools/pmc2c.t
Deleted:
trunk/t/tools/pmc2c.t
Modified:
trunk/MANIFEST
Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST Tue Sep 29 22:17:04 2009 (r41564)
+++ trunk/MANIFEST Tue Sep 29 22:46:47 2009 (r41565)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Tue Sep 29 07:08:19 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Tue Sep 29 20:27:37 2009 UT
#
# See below for documentation on the format of this file.
#
@@ -2051,7 +2051,6 @@
t/tools/pbc_dump.t [test]
t/tools/pbc_merge.t [test]
t/tools/pgegrep.t [test]
-t/tools/pmc2c.t [test]
t/tools/pmc2cutils/00-qualify.t [test]
t/tools/pmc2cutils/01-pmc2cutils.t [test]
t/tools/pmc2cutils/02-find_file.t [test]
Deleted: trunk/t/tools/pmc2c.t
==============================================================================
--- trunk/t/tools/pmc2c.t Tue Sep 29 22:46:47 2009 (r41564)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,236 +0,0 @@
-#! perl
-# Copyright (C) 2005-2008, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-t/tools/pmc2c.t - test the PMC to C generator
-
-=head1 SYNOPSIS
-
- % prove t/tools/pmc2c.t
-
-=head1 DESCRIPTION
-
-Tests the C<pmc2c> utility by providing it with a number of source
-pmc files, having it generate the resulting C file and verifying
-the output.
-
-We never actually check the *full* output of the conversion.
-We simply check several smaller components to avoid a test file
-that is far too unwieldy.
-
-=cut
-
-use strict;
-use warnings;
-use lib qw( . lib ../lib ../../lib );
-
-use Fatal qw{open close};
-use Test::More;
-use Parrot::Test tests => 12;
-use Parrot::Config;
-
-my $pmc2c = join $PConfig{slash}, qw(. tools build pmc2c.pl);
-
-sub pmc2c_output_like {
- my ($pmc, $c, $name) = @_;
- my $c_file = pmc_to_c($pmc);
-
- open my $c_fh, '<', $c_file;
- my $c_output = do { local $/; <$c_fh> };
- close $c_fh;
-
- unless ( ref $c ) {
- chomp $c;
- $c = qr{\Q$c\E};
- }
-
- like( $c_output, $c, $name );
-}
-
-{
- my $counter = 0;
-
- sub pmc_to_c {
- my $pmc = shift;
-
- $counter++;
-
- my $pmc_file = "$0_$counter.pmc";
- open my $fh, '>', $pmc_file;
- print {$fh} $pmc;
- close $fh;
-
- system("$^X $pmc2c --dump $pmc_file");
- system("$^X $pmc2c -c $pmc_file");
-
- (my $c_file = $pmc_file) =~ s/\.pmc$/\.c/;
-
- return $c_file;
- }
-
-}
-
-SKIP: {
- skip "Test use a deprecated feature.", 12;
-pmc2c_output_like( <<'END_PMC', qr{DO NOT EDIT THIS FILE}, 'no edit warning' );
-pmclass a { }
-END_PMC
-
-pmc2c_output_like( <<'END_PMC', <<'END_C', 'includes' );
-pmclass a { }
-END_PMC
-#include "parrot/parrot.h"
-#include "parrot/extend.h"
-#include "parrot/dynext.h"
-#include "pmc_a.h"
-#include "pmc_default.h"
-#include "a.str"
-END_C
-
-TODO: {
- local $TODO = "needs fixing after vtinit merge";
-pmc2c_output_like( <<'END_PMC', <<'END_C', 'class initialization' );
-pmclass a { }
-END_PMC
-void
-Parrot_a_class_init(PARROT_INTERP, int entry, int pass)
-{
- static const char attr_defs [] =
- "";
- const VTABLE temp_base_vtable = {
-END_C
-}
-
-pmc2c_output_like( <<'END_PMC', <<'END_C', 'comment passthrough' );
-pmclass a { }
-/* passthrough */
-END_PMC
-/* passthrough */
-END_C
-
-pmc2c_output_like( <<'END_PMC', <<'END_C', 'pod passthrough' );
-pmclass a { }
-
-=for naught
-
-Documentation
-
-=cut
-END_PMC
-=for naught
-
-Documentation
-
-=cut
-END_C
-
-TODO: {
- local $TODO = 'needs fixing after vtinit merge';
-
-pmc2c_output_like( <<'END_PMC', <<'END_C', 'provides' );
-pmclass a provides nothing { }
-END_PMC
-vt_clone->provides_str = CONST_STRING_GEN(interp, "nothing");
-END_C
-
-}
-
-pmc2c_output_like( <<'END_PMC', <<'END_C', 'maps' );
-pmclass a hll dale maps Integer { }
-END_PMC
- const INTVAL hll_id = Parrot_get_HLL_id( interp, CONST_STRING_GEN(interp, "dale"));
- if (hll_id > 0) {
- Parrot_register_HLL_type( interp, hll_id, enum_class_Integer, entry);
- }
-END_C
-
-pmc2c_output_like( <<'END_PMC', <<'END_C', 'maps, more than one.' );
-pmclass a hll dale maps Integer maps Float { }
-END_PMC
- const INTVAL hll_id = Parrot_get_HLL_id( interp, CONST_STRING_GEN(interp, "dale"));
- if (hll_id > 0) {
- Parrot_register_HLL_type( interp, hll_id, enum_class_Float, entry);
- Parrot_register_HLL_type( interp, hll_id, enum_class_Integer, entry);
- }
-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
-
-# test attr/comment line numbering
-pmc2c_output_like( <<'END_PMC', <<'END_C', 'line+pod' );
-pmclass a {
- ATTR int foo;
-
- /* Comment comment comment.
- * Blah blah blah.
- */
-
- VTABLE void init() {
- Parrot_a_attributes * attrs =
- mem_allocate_zeroed_typed(Parrot_a_attributes);
-
- attrs->hash = pmc_new(interp, enum_class_Hash);
-
- PMC_data(SELF) = attrs;
- }
-}
-END_PMC
-static void
-Parrot_a_init(PARROT_INTERP, PMC *pmc)
-{
-#line 8
-END_C
-
-# test EOF/coda line numbering
-# Note: We can't test the whole thing, as the filename component varies
-pmc2c_output_like( <<'END_PMC', <<'END_C', 'line+pod' );
-pmclass a {
- ATTR int foo;
-
- /* Comment comment comment.
- * Blah blah blah.
- */
-
- VTABLE void init() {
- PMC_data(SELF) = NULL;
- }
-
-}
-
-/* foo bar */
-END_PMC
-} /* Parrot_a_class_init */
-#line 11
-END_C
-}
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
More information about the parrot-commits
mailing list