Permalink
Browse files

minimal test of the bundled Winxed

  • Loading branch information...
1 parent bba5080 commit 96fac305d02ea9a2c2edbcec7d2cf01aa4ded8e2 @NotFound NotFound committed Jul 6, 2011
Showing with 52 additions and 0 deletions.
  1. +1 −0 MANIFEST
  2. +1 −0 lib/Parrot/Harness/DefaultTests.pm
  3. +50 −0 t/ext/winxed/compreg.t
View
@@ -1678,6 +1678,7 @@ t/examples/shootout.t [test]
t/examples/streams.t [test]
t/examples/subs.t [test]
t/examples/tutorial.t [test]
+t/ext/winxed/compreg.t [test]
t/harness [test]
t/harness.pir [test]
t/include/fp_equality.t [test]
@@ -89,6 +89,7 @@ our @EXPORT_OK = qw(
t/dynoplibs/*.t
t/dynpmc/*.t
t/library/*.t
+ t/ext/winxed/*.t
t/tools/*.t
t/profiling/*.t
);
@@ -0,0 +1,50 @@
+#!./parrot
+# Copyright (C) 2011, Parrot Foundation.
+
+=head1 NAME
+
+t/ext/winxed/compreg.t - test winxed compreg.
+
+=head1 SYNOPSIS
+
+ % prove t/ext/winxed/compreg.t
+
+=head1 DESCRIPTION
+
+Tests using winxed compreg.
+
+=cut
+
+.sub main :main
+ .include 'test_more.pir'
+ plan(2)
+
+ .local pmc wcomp
+ .local int r
+
+ load_language 'winxed'
+ wcomp = compreg 'winxed'
+ r = isnull wcomp
+ is(r, 0, "winxed compreg is not null")
+
+ .local string source
+ .local pmc result
+
+ source = <<'SOURCE'
+function main(argv)
+{
+ string s = "hello";
+ say(s);
+}
+SOURCE
+
+ result = wcomp.'compile'(source, "pir" :named("target"))
+ like(result, "hello", "pir geenrated from a simple source looks good")
+
+.end
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:

0 comments on commit 96fac30

Please sign in to comment.