[svn:parrot] r40522 - in branches/auto_attrs: . config/auto/sizes config/gen/makefiles config/init/hints docs/book/draft docs/book/pct docs/dev docs/pdds examples/embed examples/languages/abc examples/languages/squaak examples/pge include/parrot lib/Parrot/Harness ports/cpan ports/cygwin ports/debian ports/fedora ports/mandriva ports/suse runtime/parrot/languages runtime/parrot/library/Math src src/call src/dynoplibs src/gc src/interp src/runcore t/compilers/pge t/compilers/tge t/dynoplibs t/oo t/op t/pharness t/pmc t/src tools/dev tools/util
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Thu Aug 13 11:30:14 UTC 2009
Author: NotFound
Date: Thu Aug 13 11:30:10 2009
New Revision: 40522
URL: https://trac.parrot.org/parrot/changeset/40522
Log:
merge from trunk r40521
Added:
branches/auto_attrs/src/dynoplibs/math.ops
- copied unchanged from r40521, trunk/src/dynoplibs/math.ops
branches/auto_attrs/t/compilers/pge/regression.t
- copied unchanged from r40521, trunk/t/compilers/pge/regression.t
branches/auto_attrs/t/dynoplibs/math.t
- copied unchanged from r40521, trunk/t/dynoplibs/math.t
Modified:
branches/auto_attrs/ (props changed)
branches/auto_attrs/MANIFEST
branches/auto_attrs/MANIFEST.generated
branches/auto_attrs/config/auto/sizes/intval_maxmin_c.in (props changed)
branches/auto_attrs/config/gen/makefiles/dynoplibs.in
branches/auto_attrs/config/gen/makefiles/root.in
branches/auto_attrs/config/init/hints/mswin32.pm
branches/auto_attrs/docs/book/draft/README (props changed)
branches/auto_attrs/docs/book/draft/appa_glossary.pod (props changed)
branches/auto_attrs/docs/book/draft/appb_patch_submission.pod (props changed)
branches/auto_attrs/docs/book/draft/appc_command_line_options.pod (props changed)
branches/auto_attrs/docs/book/draft/appd_build_options.pod (props changed)
branches/auto_attrs/docs/book/draft/appe_source_code.pod (props changed)
branches/auto_attrs/docs/book/draft/ch01_introduction.pod (props changed)
branches/auto_attrs/docs/book/draft/ch02_getting_started.pod (props changed)
branches/auto_attrs/docs/book/draft/ch07_dynpmcs.pod (props changed)
branches/auto_attrs/docs/book/draft/ch08_dynops.pod (props changed)
branches/auto_attrs/docs/book/draft/ch10_opcode_reference.pod (props changed)
branches/auto_attrs/docs/book/draft/ch11_directive_reference.pod (props changed)
branches/auto_attrs/docs/book/draft/ch12_operator_reference.pod (props changed)
branches/auto_attrs/docs/book/draft/chXX_hlls.pod (props changed)
branches/auto_attrs/docs/book/draft/chXX_library.pod (props changed)
branches/auto_attrs/docs/book/draft/chXX_testing_and_debugging.pod (props changed)
branches/auto_attrs/docs/book/pct/ch01_introduction.pod (props changed)
branches/auto_attrs/docs/book/pct/ch02_getting_started.pod (props changed)
branches/auto_attrs/docs/book/pct/ch03_compiler_tools.pod (props changed)
branches/auto_attrs/docs/book/pct/ch04_pge.pod (props changed)
branches/auto_attrs/docs/book/pct/ch05_nqp.pod (props changed)
branches/auto_attrs/docs/dev/c_functions.pod (props changed)
branches/auto_attrs/docs/pdds/pdd30_install.pod (props changed)
branches/auto_attrs/examples/embed/cotorra.c (props changed)
branches/auto_attrs/examples/languages/abc/ (props changed)
branches/auto_attrs/examples/languages/squaak/ (props changed)
branches/auto_attrs/examples/pge/demo.pir (props changed)
branches/auto_attrs/include/parrot/call.h (props changed)
branches/auto_attrs/include/parrot/gc_api.h (props changed)
branches/auto_attrs/include/parrot/oo.h
branches/auto_attrs/include/parrot/runcore_api.h (props changed)
branches/auto_attrs/include/parrot/runcore_trace.h (props changed)
branches/auto_attrs/lib/Parrot/Harness/DefaultTests.pm
branches/auto_attrs/ports/cpan/pause_guide.pod (props changed)
branches/auto_attrs/ports/cygwin/parrot-1.0.0-1.cygport (props changed)
branches/auto_attrs/ports/debian/libparrot-dev.install.in (props changed)
branches/auto_attrs/ports/debian/libparrot.install.in (props changed)
branches/auto_attrs/ports/debian/parrot-doc.install.in (props changed)
branches/auto_attrs/ports/debian/parrot.install.in (props changed)
branches/auto_attrs/ports/fedora/parrot.spec.fedora (props changed)
branches/auto_attrs/ports/mandriva/parrot.spec.mandriva (props changed)
branches/auto_attrs/ports/suse/parrot.spec.suse (props changed)
branches/auto_attrs/runtime/parrot/languages/ (props changed)
branches/auto_attrs/runtime/parrot/library/Math/Rand.pir (props changed)
branches/auto_attrs/src/call/ops.c (props changed)
branches/auto_attrs/src/call/pcc.c (props changed)
branches/auto_attrs/src/gc/alloc_memory.c (props changed)
branches/auto_attrs/src/gc/alloc_register.c (props changed)
branches/auto_attrs/src/gc/alloc_resources.c (props changed)
branches/auto_attrs/src/gc/api.c (contents, props changed)
branches/auto_attrs/src/gc/generational_ms.c (props changed)
branches/auto_attrs/src/gc/incremental_ms.c (props changed)
branches/auto_attrs/src/gc/malloc.c (props changed)
branches/auto_attrs/src/gc/malloc_trace.c (props changed)
branches/auto_attrs/src/gc/mark_sweep.c (props changed)
branches/auto_attrs/src/gc/system.c (props changed)
branches/auto_attrs/src/interp/inter_cb.c (props changed)
branches/auto_attrs/src/interp/inter_create.c (props changed)
branches/auto_attrs/src/interp/inter_misc.c (props changed)
branches/auto_attrs/src/oo.c
branches/auto_attrs/src/runcore/cores.c (props changed)
branches/auto_attrs/src/runcore/main.c (props changed)
branches/auto_attrs/src/runcore/trace.c (props changed)
branches/auto_attrs/t/compilers/tge/NoneGrammar.tg (props changed)
branches/auto_attrs/t/oo/root_new.t (props changed)
branches/auto_attrs/t/op/io.t
branches/auto_attrs/t/op/sprintf.t
branches/auto_attrs/t/pharness/01-default_tests.t
branches/auto_attrs/t/pmc/capture.t
branches/auto_attrs/t/pmc/key.t
branches/auto_attrs/t/pmc/resizablestringarray.t
branches/auto_attrs/t/pmc/sub.t
branches/auto_attrs/t/src/embed.t (props changed)
branches/auto_attrs/tools/dev/fetch_languages.pl (props changed)
branches/auto_attrs/tools/dev/mk_gitignore.pl (props changed)
branches/auto_attrs/tools/util/perlcritic-cage.conf (props changed)
Modified: branches/auto_attrs/MANIFEST
==============================================================================
--- branches/auto_attrs/MANIFEST Thu Aug 13 11:11:45 2009 (r40521)
+++ branches/auto_attrs/MANIFEST Thu Aug 13 11:30:10 2009 (r40522)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Sun Aug 9 22:34:52 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Thu Aug 13 02:35:20 2009 UT
#
# See below for documentation on the format of this file.
#
@@ -1248,6 +1248,7 @@
src/dynext.c []
src/dynoplibs/README []doc
src/dynoplibs/obscure.ops []
+src/dynoplibs/math.ops []
src/dynpmc/README.pod []doc
src/dynpmc/dynlexpad.pmc [devel]src
src/dynpmc/ext.pir []
@@ -1597,6 +1598,7 @@
t/compilers/pge/pge_globs.t [test]
t/compilers/pge/pge_text.t [test]
t/compilers/pge/pge_util.t [test]
+t/compilers/pge/regression.t [test]
t/compilers/tge/NoneGrammar.tg [test]
t/compilers/tge/basic.t [test]
t/compilers/tge/grammar.t [test]
@@ -1673,6 +1675,7 @@
t/distro/manifest.t [test]
t/distro/meta_yml.t [test]
t/dynoplibs/obscure.t [test]
+t/dynoplibs/math.t [test]
t/dynpmc/dynlexpad.t [test]
t/dynpmc/foo.t [test]
t/dynpmc/foo2.t [test]
@@ -1823,11 +1826,11 @@
t/perl/testlib/answer.pir [test]
t/perl/testlib/hello [test]
t/perl/testlib/hello.pasm [test]
-t/pir/macro.t [test]
t/pharness/01-default_tests.t [test]
t/pharness/02-get_test_prog_args.t [test]
t/pharness/03-handle_long_options.t [test]
t/pharness/04-Usage.t [test]
+t/pir/macro.t [test]
t/pmc/addrregistry.t [test]
t/pmc/array.t [test]
t/pmc/arrayiterator.t [test]
Modified: branches/auto_attrs/MANIFEST.generated
==============================================================================
--- branches/auto_attrs/MANIFEST.generated Thu Aug 13 11:11:45 2009 (r40521)
+++ branches/auto_attrs/MANIFEST.generated Thu Aug 13 11:30:10 2009 (r40522)
@@ -48,6 +48,7 @@
include/parrot/vtable.h [main]include
install_config.fpmc [main]lib
src/install_config.o [main]lib
+src/install_config.obj [main]lib
installable_parrot_config.exe [main]bin
installable_parrot_config [main]bin
installable_parrot_debugger.exe [main]bin
@@ -64,6 +65,7 @@
installable_pbc_to_exe [main]bin
lib/Parrot/Config/Generated.pm [devel]lib
libparrot.dll [main]bin
+libparrot.lib [main]bin
lib/Parrot/OpLib/core.pm [devel]lib
lib/Parrot/Pmc2c/PCCMETHOD_BITS.pm [devel]lib
lib/Parrot/PMC.pm [devel]lib
Modified: branches/auto_attrs/config/gen/makefiles/dynoplibs.in
==============================================================================
--- branches/auto_attrs/config/gen/makefiles/dynoplibs.in Thu Aug 13 11:11:45 2009 (r40521)
+++ branches/auto_attrs/config/gen/makefiles/dynoplibs.in Thu Aug 13 11:30:10 2009 (r40522)
@@ -26,7 +26,11 @@
#IF(cg_flag): obscure_ops_cg$(LOAD_EXT) \
#IF(cg_flag): obscure_ops_cgp$(LOAD_EXT) \
obscure_ops$(LOAD_EXT) \
- obscure_ops_switch$(LOAD_EXT)
+ obscure_ops_switch$(LOAD_EXT) \
+#IF(cg_flag): math_ops_cg$(LOAD_EXT) \
+#IF(cg_flag): math_ops_cgp$(LOAD_EXT) \
+ math_ops$(LOAD_EXT) \
+ math_ops_switch$(LOAD_EXT)
CLEANUPS := \
"*.c" \
@@ -85,6 +89,42 @@
obscure_ops_cgp.c: obscure.ops
$(OPS2C) CGP --dynamic obscure.ops
+math_ops$(LOAD_EXT): math_ops$(O)
+ $(LD) @ld_out at math_ops$(LOAD_EXT) math_ops$(O) $(LINKARGS)
+
+math_ops$(O): math_ops.c
+ $(CC) -c @cc_o_out at math_ops$(O) $(INCLUDES) $(CFLAGS) math_ops.c
+
+math_ops.c: math.ops
+ $(OPS2C) C --dynamic math.ops
+
+math_ops_switch$(LOAD_EXT): math_ops_switch$(O)
+ $(LD) @ld_out at math_ops_switch$(LOAD_EXT) math_ops_switch$(O) $(LINKARGS)
+
+math_ops_switch$(O): math_ops_switch.c
+ $(CC) -c @cc_o_out at math_ops_switch$(O) $(INCLUDES) $(CFLAGS) math_ops_switch.c
+
+math_ops_switch.c: math.ops
+ $(OPS2C) CSwitch --dynamic math.ops
+
+math_ops_cg$(LOAD_EXT): math_ops_cg$(O)
+ $(LD) @ld_out at math_ops_cg$(LOAD_EXT) math_ops_cg$(O) $(LINKARGS)
+
+math_ops_cg$(O): math_ops_cg.c
+ $(CC) -c @cc_o_out at math_ops_cg$(O) $(INCLUDES) $(CFLAGS) math_ops_cg.c
+
+math_ops_cg.c: math.ops
+ $(OPS2C) CGoto --dynamic math.ops
+
+math_ops_cgp$(LOAD_EXT): math_ops_cgp$(O)
+ $(LD) @ld_out at math_ops_cgp$(LOAD_EXT) math_ops_cgp$(O) $(LINKARGS)
+
+math_ops_cgp$(O): math_ops_cgp.c
+ $(CC) -c @cc_o_out at math_ops_cgp$(O) $(INCLUDES) $(CFLAGS) math_ops_cgp.c
+
+math_ops_cgp.c: math.ops
+ $(OPS2C) CGP --dynamic math.ops
+
test : all
cd ../.. && $(PERL) -Ilib t/harness t/dynoplibs/*.t
Modified: branches/auto_attrs/config/gen/makefiles/root.in
==============================================================================
--- branches/auto_attrs/config/gen/makefiles/root.in Thu Aug 13 11:11:45 2009 (r40521)
+++ branches/auto_attrs/config/gen/makefiles/root.in Thu Aug 13 11:30:10 2009 (r40522)
@@ -585,17 +585,9 @@
###############################################################################
all : \
- flags_dummy \
- PARROT_LIBS \
- $(PARROT) \
- runtime/parrot/include/parrotlib.pbc \
- runtime/parrot/include/config.fpmc \
+ corevm \
docs \
- $(LIBNCI_TEST_SO) \
#IF(has_glut): $(LIBGLUTCB_SO) \
- $(GEN_LIBRARY) \
- dynpmc \
- dynoplibs \
compilers \
$(DIS) \
$(PARROT_CONFIG) \
@@ -604,6 +596,17 @@
$(PDB) \
$(PDUMP) \
+corevm : \
+ flags_dummy \
+ PARROT_LIBS \
+ $(PARROT) \
+ runtime/parrot/include/parrotlib.pbc \
+ runtime/parrot/include/config.fpmc \
+ $(LIBNCI_TEST_SO) \
+ $(GEN_LIBRARY) \
+ dynpmc \
+ dynoplibs \
+
$(GEN_LIBRARY) : $(PARROT)
# constant string support
@@ -1506,7 +1509,7 @@
smoke : smolder_test
# "core tests" -- test basic functionality but not ancillaries
-coretest : test_prep
+coretest : corevm
$(PERL) t/harness $(EXTRA_TEST_ARGS) --core-tests
# automake compatibility
Modified: branches/auto_attrs/config/init/hints/mswin32.pm
==============================================================================
--- branches/auto_attrs/config/init/hints/mswin32.pm Thu Aug 13 11:11:45 2009 (r40521)
+++ branches/auto_attrs/config/init/hints/mswin32.pm Thu Aug 13 11:30:10 2009 (r40522)
@@ -114,6 +114,8 @@
# Unclear if it's needed both for ld and link.
$conf->data->set( libparrot_ldflags => "\"$build_dir\\libparrot.lib\"" );
$conf->data->set( libparrot_linkflags => "\"$build_dir\\libparrot.lib\"" );
+ $conf->data->set( inst_libparrot_ldflags => "\"$bindir\\libparrot.lib\"" );
+ $conf->data->set( inst_libparrot_linkflags => "\"$bindir\\libparrot.lib\"" );
# 'link' needs to be link.exe, not cl.exe.
# This makes 'link' and 'ld' the same.
Modified: branches/auto_attrs/include/parrot/oo.h
==============================================================================
--- branches/auto_attrs/include/parrot/oo.h Thu Aug 13 11:11:45 2009 (r40521)
+++ branches/auto_attrs/include/parrot/oo.h Thu Aug 13 11:30:10 2009 (r40522)
@@ -106,6 +106,16 @@
PARROT_EXPORT
PARROT_CAN_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
+PMC * Parrot_oo_find_vtable_override(PARROT_INTERP,
+ ARGIN(PMC *classobj),
+ ARGIN(STRING *name))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+PARROT_EXPORT
+PARROT_CAN_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
PMC * Parrot_oo_find_vtable_override_for_class(PARROT_INTERP,
ARGIN(PMC *classobj),
ARGIN(STRING *name))
@@ -155,15 +165,6 @@
PARROT_CAN_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
-PMC * Parrot_oo_find_vtable_override(PARROT_INTERP,
- ARGIN(PMC *classobj),
- ARGIN(STRING *name))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
-PARROT_CAN_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
PMC * Parrot_oo_get_namespace(SHIM_INTERP, ARGIN(const PMC *classobj))
__attribute__nonnull__(2);
@@ -211,6 +212,11 @@
#define ASSERT_ARGS_Parrot_invalidate_method_cache \
__attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
+#define ASSERT_ARGS_Parrot_oo_find_vtable_override \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+ PARROT_ASSERT_ARG(interp) \
+ || PARROT_ASSERT_ARG(classobj) \
+ || PARROT_ASSERT_ARG(name)
#define ASSERT_ARGS_Parrot_oo_find_vtable_override_for_class \
__attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
@@ -236,11 +242,6 @@
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(self) \
|| PARROT_ASSERT_ARG(ns)
-#define ASSERT_ARGS_Parrot_oo_find_vtable_override \
- __attribute__unused__ int _ASSERT_ARGS_CHECK = \
- PARROT_ASSERT_ARG(interp) \
- || PARROT_ASSERT_ARG(classobj) \
- || PARROT_ASSERT_ARG(name)
#define ASSERT_ARGS_Parrot_oo_get_namespace __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(classobj)
#define ASSERT_ARGS_Parrot_oo_new_object_attrs __attribute__unused__ int _ASSERT_ARGS_CHECK = \
Modified: branches/auto_attrs/lib/Parrot/Harness/DefaultTests.pm
==============================================================================
--- branches/auto_attrs/lib/Parrot/Harness/DefaultTests.pm Thu Aug 13 11:11:45 2009 (r40521)
+++ branches/auto_attrs/lib/Parrot/Harness/DefaultTests.pm Thu Aug 13 11:30:10 2009 (r40522)
@@ -10,10 +10,11 @@
This file exports by default a single subroutine, C<get_default_tests()>,
which is the list of tests run by F<t/harness> by default.
-Upon request, this package exports five arrays holding various sets of tests:
+Upon request, this package exports six arrays holding various sets of tests:
@runcore_tests
@core_tests
+ @library_tests
@configure_tests
@standard_tests
@developing_tests
@@ -31,6 +32,7 @@
our (
@runcore_tests,
@core_tests,
+ @library_tests,
@configure_tests,
@standard_tests,
@developing_tests
@@ -40,6 +42,7 @@
our @EXPORT_OK = qw(
@runcore_tests
@core_tests
+ @library_tests
@configure_tests
@standard_tests
@developing_tests
@@ -54,12 +57,6 @@
t/native_pbc/*.t
t/dynpmc/*.t
t/dynoplibs/*.t
- t/compilers/pct/*.t
- t/compilers/pge/*.t
- t/compilers/pge/p5regex/*.t
- t/compilers/pge/perl6regex/*.t
- t/compilers/tge/*.t
- t/library/*.t
);
# core tests are run unless --runcore-tests is present. Typically
@@ -67,9 +64,18 @@
@core_tests = qw(
t/run/*.t
t/src/*.t
- t/tools/*.t
t/perl/*.t
- t/stm/*.t
+);
+
+# library tests are run unless --runcore-tests or --core-tests is present.
+ at library_tests = qw(
+ t/compilers/pct/*.t
+ t/compilers/pge/*.t
+ t/compilers/pge/p5regex/*.t
+ t/compilers/pge/perl6regex/*.t
+ t/compilers/tge/*.t
+ t/library/*.t
+ t/tools/*.t
);
# configure tests are tests to be run at the beginning of 'make test';
@@ -107,6 +113,7 @@
unless ($runcore_tests_only) {
push @default_tests, @core_tests;
unless ($core_tests_only) {
+ push @default_tests, @library_tests;
unshift @default_tests, @configure_tests;
}
}
Copied: branches/auto_attrs/src/dynoplibs/math.ops (from r40521, trunk/src/dynoplibs/math.ops)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/auto_attrs/src/dynoplibs/math.ops Thu Aug 13 11:30:10 2009 (r40522, copy of r40521, trunk/src/dynoplibs/math.ops)
@@ -0,0 +1,79 @@
+/*
+ * $Id$
+** math.ops
+*/
+
+BEGIN_OPS_PREAMBLE
+
+#include <math.h>
+
+END_OPS_PREAMBLE
+
+=head1 NAME
+
+math.ops - Mathematical Opcodes
+
+=cut
+
+=head1 DESCRIPTION
+
+Parrot's library of mathematical ops.
+
+To use this library of ops, add this directive to your PIR:
+
+ .loadlib 'math_ops'
+
+=cut
+
+=over
+
+=item B<rand>(out NUM)
+
+Set $1 to a random floating point number between 0 and 1, inclusive.
+
+=cut
+
+inline op rand(out NUM) {
+ $1 = Parrot_float_rand(0);
+}
+
+=item B<rand>(out NUM, in NUM)
+
+Set $1 to a random floating point number between 0 and and $2, inclusive.
+
+=cut
+
+inline op rand(out NUM, in NUM) {
+ $1 = $2 * Parrot_float_rand(0);
+}
+
+=item B<rand>(out NUM, in NUM, in NUM)
+
+Set $1 to a random floating point number between $2 and and $3, inclusive.
+
+=cut
+
+inline op rand(out NUM, in NUM, in NUM) {
+ $1 = $2 + ($3 - $2) * Parrot_float_rand(0);
+}
+
+=back
+
+=head1 COPYRIGHT
+
+Copyright (C) 2001-2009, Parrot Foundation.
+
+=head1 LICENSE
+
+This program is free software. It is subject to the same license
+as the Parrot interpreter itself.
+
+=cut
+
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Modified: branches/auto_attrs/src/gc/api.c
==============================================================================
--- branches/auto_attrs/src/gc/api.c Thu Aug 13 11:11:45 2009 (r40521)
+++ branches/auto_attrs/src/gc/api.c Thu Aug 13 11:30:10 2009 (r40522)
@@ -1086,7 +1086,7 @@
mem_internal_free(interp->arena_base->sized_header_pools);
if (interp->arena_base->attrib_pools)
mem_internal_free(interp->arena_base->attrib_pools);
- interp->arena_base->attrib_pools;
+ interp->arena_base->attrib_pools = NULL;
interp->arena_base->sized_header_pools = NULL;
}
Modified: branches/auto_attrs/src/oo.c
==============================================================================
--- branches/auto_attrs/src/oo.c Thu Aug 13 11:11:45 2009 (r40521)
+++ branches/auto_attrs/src/oo.c Thu Aug 13 11:30:10 2009 (r40522)
@@ -509,6 +509,7 @@
*/
+PARROT_EXPORT
PARROT_CAN_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
PMC *
Copied: branches/auto_attrs/t/compilers/pge/regression.t (from r40521, trunk/t/compilers/pge/regression.t)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/auto_attrs/t/compilers/pge/regression.t Thu Aug 13 11:30:10 2009 (r40522, copy of r40521, trunk/t/compilers/pge/regression.t)
@@ -0,0 +1,60 @@
+#! perl
+# Copyright (C) 2001-2009, Parrot Foundation.
+# $Id$
+
+use strict;
+use warnings;
+use lib qw( t . lib ../lib ../../lib );
+use Test::More;
+use Parrot::Test tests => 2;
+
+=head1 NAME
+
+t/compilers/pge/regression.t - PGE regression tests
+
+=head1 SYNOPSIS
+
+ % prove t/compilers/pge/regression.t
+
+=cut
+
+pir_output_is( <<'CODE', <<'OUTPUT', 'load_bytecode with .pir (RT #39807)' );
+.sub main :main
+ load_bytecode 'PGE.pbc'
+ load_bytecode 'dumper.pir'
+ load_bytecode 'PGE/Dumper.pir'
+
+ $P0 = compreg 'PGE::P5Regex'
+ $P1 = $P0('aabb*')
+ $P2 = $P1('fooaabbbar')
+
+ _dumper($P2)
+.end
+CODE
+"VAR1" => PMC 'PGE;Match' => "aabbb" @ 3
+OUTPUT
+
+pir_output_is( <<'CODE', <<'OUTPUT', 'load_bytecode with .pbc (RT #39807)' );
+.sub main :main
+ load_bytecode 'PGE.pbc'
+ load_bytecode 'dumper.pbc'
+ load_bytecode 'PGE/Dumper.pbc'
+
+ $P0 = compreg 'PGE::P5Regex'
+ $P1 = $P0('aabb*')
+ $P2 = $P1('fooaabbbar')
+
+ _dumper($P2)
+.end
+CODE
+"VAR1" => PMC 'PGE;Match' => "aabbb" @ 3
+OUTPUT
+
+
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Copied: branches/auto_attrs/t/dynoplibs/math.t (from r40521, trunk/t/dynoplibs/math.t)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/auto_attrs/t/dynoplibs/math.t Thu Aug 13 11:30:10 2009 (r40522, copy of r40521, trunk/t/dynoplibs/math.t)
@@ -0,0 +1,82 @@
+#! parrot
+# Copyright (C) 2009, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+t/dynoplibs/math.t - Tests for mathematical ops
+
+=head1 SYNOPSIS
+
+ % prove t/dynoblibs/math.t
+
+=head1 DESCRIPTION
+
+Tests math.ops
+
+=cut
+
+.loadlib 'math_ops'
+.sub main :main
+ .include 'test_more.pir'
+ plan(7)
+ ok(1, "load math_ops")
+ basic_test_1_arg()
+ basic_test_2_arg()
+ basic_test_3_arg()
+.end
+
+.sub basic_test_1_arg
+ rand $N0
+ lt $N0, 0, fail1
+ ok(1, 'rand returns a number greater than or equal to 0')
+ goto upper
+fail1:
+ ok(0, 'rand returns a number greater than or equal to 0')
+upper:
+ gt $N0, 1, fail2
+ ok(1, 'rand returns a number less than or equal to 1')
+ goto finish
+fail2:
+ ok(0, 'rand returns a number less than or equal to 1')
+finish:
+.end
+
+.sub basic_test_2_arg
+ rand $N0, 5
+ lt $N0, 0, fail1
+ ok(1, 'rand returns a number greater than or equal to 0')
+ goto upper
+fail1:
+ ok(0, 'rand returns a number greater than or equal to 0')
+upper:
+ gt $N0, 5, fail2
+ ok(1, 'rand returns a number less than or equal to 5')
+ goto finish
+fail2:
+ ok(0, 'rand returns a number less than or equal to 5')
+finish:
+.end
+
+.sub basic_test_3_arg
+ rand $N0, 5, 25
+ lt $N0, 5, fail1
+ ok(1, 'rand returns a number greater than or equal to 5')
+ goto upper
+fail1:
+ ok(0, 'rand returns a number greater than or equal to 5')
+upper:
+ gt $N0, 25, fail2
+ ok(1, 'rand returns a number less than or equal to 25')
+ goto finish
+fail2:
+ ok(0, 'rand returns a number less than or equal to 25')
+finish:
+.end
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 filetype=pir:
Modified: branches/auto_attrs/t/op/io.t
==============================================================================
--- branches/auto_attrs/t/op/io.t Thu Aug 13 11:11:45 2009 (r40521)
+++ branches/auto_attrs/t/op/io.t Thu Aug 13 11:30:10 2009 (r40522)
@@ -96,7 +96,8 @@
unless pipe goto open_pipe_for_reading_failed
.local string line
line = readline pipe
- like('This is Parrot', ":s This is Parrot", 'open pipe for reading')
+ line = substr line, 0, 14
+ is('This is Parrot', line, 'open pipe for reading')
.return ()
open_pipe_for_reading_failed:
Modified: branches/auto_attrs/t/op/sprintf.t
==============================================================================
--- branches/auto_attrs/t/op/sprintf.t Thu Aug 13 11:11:45 2009 (r40521)
+++ branches/auto_attrs/t/op/sprintf.t Thu Aug 13 11:30:10 2009 (r40522)
@@ -61,8 +61,6 @@
.sub main :main
load_bytecode 'Test/Builder.pbc'
- load_bytecode 'PGE.pbc'
- load_bytecode 'PGE/Dumper.pbc'
.include "iglobals.pasm"
.include "sysinfo.pasm"
Modified: branches/auto_attrs/t/pharness/01-default_tests.t
==============================================================================
--- branches/auto_attrs/t/pharness/01-default_tests.t Thu Aug 13 11:11:45 2009 (r40521)
+++ branches/auto_attrs/t/pharness/01-default_tests.t Thu Aug 13 11:30:10 2009 (r40522)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2007, Parrot Foundation.
+# Copyright (C) 2007-2009, Parrot Foundation.
# $Id$
# 01-default_tests.t
@@ -23,6 +23,8 @@
@Parrot::Harness::DefaultTests::configure_tests = qw( gamma.t );
@Parrot::Harness::DefaultTests::standard_tests = qw( delta.t );
@Parrot::Harness::DefaultTests::developing_tests = qw( epsilon.t );
+ at Parrot::Harness::DefaultTests::library_tests = qw( zeta.t );
+
my ($core_tests_only, $runcore_tests_only);
my (@default_tests, $default_tests_ref);
@@ -54,16 +56,16 @@
ok(@default_tests =
get_default_tests($core_tests_only, $runcore_tests_only),
"get_default_tests() returned successfully");
- is(scalar(@default_tests), 3, "Got expected 3 tests");
+ is(scalar(@default_tests), 4, "Got expected 4 tests");
is($default_tests[0], q{gamma.t}, "Start with configure_tests as expected");
- is($default_tests[2], q{beta.t}, "End with core_tests as expected");
+ is($default_tests[3], q{zeta.t}, "End with library_tests as expected");
@default_tests = ();
($core_tests_only, $runcore_tests_only) = (0,0);
ok($default_tests_ref =
get_default_tests($core_tests_only, $runcore_tests_only),
"get_default_tests() returned successfully");
- is(scalar(@{ $default_tests_ref }), 3, "Got expected 3 tests");
+ is(scalar(@{ $default_tests_ref }), 4, "Got expected 4 tests");
ok(chdir $cwd, "Able to change back to starting directory after testing");
}
@@ -101,9 +103,9 @@
ok(@default_tests =
get_default_tests($core_tests_only, $runcore_tests_only),
"get_default_tests() returned successfully");
- is(scalar(@default_tests), 3, "Got expected 3 tests");
+ is(scalar(@default_tests), 4, "Got expected 4 tests");
is($default_tests[0], q{gamma.t}, "Start with configure_tests as expected");
- is($default_tests[2], q{beta.t}, "End with core_tests as expected");
+ is($default_tests[3], q{zeta.t}, "End with library_tests as expected");
is(scalar(@Parrot::Harness::DefaultTests::standard_tests),
2, "Got expected 2 coding standards tests");
# reset for subsequent tests
@@ -114,7 +116,7 @@
ok($default_tests_ref =
get_default_tests($core_tests_only, $runcore_tests_only),
"get_default_tests() returned successfully");
- is(scalar(@{ $default_tests_ref }), 3, "Got expected 3 tests");
+ is(scalar(@{ $default_tests_ref }), 4, "Got expected 4 tests");
# reset for subsequent tests
@Parrot::Harness::DefaultTests::standard_tests = qw( delta.t );
Modified: branches/auto_attrs/t/pmc/capture.t
==============================================================================
--- branches/auto_attrs/t/pmc/capture.t Thu Aug 13 11:11:45 2009 (r40521)
+++ branches/auto_attrs/t/pmc/capture.t Thu Aug 13 11:30:10 2009 (r40522)
@@ -231,7 +231,8 @@
.get_results (exception)
message = exception['message']
- like(message, ':s get_integer\(\) not implemented', 'get_integer not implemented')
+ message = substr message, 0, 29
+ is(message, 'get_integer() not implemented', 'get_integer not implemented')
.return ()
.end
@@ -251,7 +252,8 @@
.get_results (exception)
message = exception['message']
- like(message, ':s get_number\(\) not implemented', 'get_number not implemented')
+ message = substr message, 0, 28
+ is(message, 'get_number() not implemented', 'get_number not implemented')
.return ()
.end
Modified: branches/auto_attrs/t/pmc/key.t
==============================================================================
--- branches/auto_attrs/t/pmc/key.t Thu Aug 13 11:11:45 2009 (r40521)
+++ branches/auto_attrs/t/pmc/key.t Thu Aug 13 11:30:10 2009 (r40522)
@@ -169,7 +169,6 @@
.namespace []
.sub prepare_lib :init
- load_bytecode 'PGE.pbc'
$P0 = get_class 'Sub'
$P1 = subclass $P0, 'TclProc'
$P1 = new ['ResizablePMCArray']
Modified: branches/auto_attrs/t/pmc/resizablestringarray.t
==============================================================================
--- branches/auto_attrs/t/pmc/resizablestringarray.t Thu Aug 13 11:11:45 2009 (r40521)
+++ branches/auto_attrs/t/pmc/resizablestringarray.t Thu Aug 13 11:30:10 2009 (r40522)
@@ -1354,7 +1354,8 @@
.get_results (exception)
message = exception
still_ok:
- like(message, 'illegal\ type\ for\ splice', "splice with a different type")
+ message = substr message, 22, 23
+ is(message, 'illegal type for splice', "splice with a different type")
.end
#
Modified: branches/auto_attrs/t/pmc/sub.t
==============================================================================
--- branches/auto_attrs/t/pmc/sub.t Thu Aug 13 11:11:45 2009 (r40521)
+++ branches/auto_attrs/t/pmc/sub.t Thu Aug 13 11:30:10 2009 (r40522)
@@ -9,7 +9,7 @@
use Test::More;
use Parrot::Test::Util 'create_tempfile';
-use Parrot::Test tests => 69;
+use Parrot::Test tests => 67;
use Parrot::Config;
=head1 NAME
@@ -1224,38 +1224,6 @@
ok
OUTPUT
-pir_output_is( <<'CODE', <<'OUTPUT', 'load_bytecode with .pir (RT #39807)' );
-.sub main :main
- load_bytecode 'PGE.pbc'
- load_bytecode 'dumper.pir'
- load_bytecode 'PGE/Dumper.pir'
-
- $P0 = compreg 'PGE::P5Regex'
- $P1 = $P0('aabb*')
- $P2 = $P1('fooaabbbar')
-
- _dumper($P2)
-.end
-CODE
-"VAR1" => PMC 'PGE;Match' => "aabbb" @ 3
-OUTPUT
-
-pir_output_is( <<'CODE', <<'OUTPUT', 'load_bytecode with .pbc (RT #39807)' );
-.sub main :main
- load_bytecode 'PGE.pbc'
- load_bytecode 'dumper.pbc'
- load_bytecode 'PGE/Dumper.pbc'
-
- $P0 = compreg 'PGE::P5Regex'
- $P1 = $P0('aabb*')
- $P2 = $P1('fooaabbbar')
-
- _dumper($P2)
-.end
-CODE
-"VAR1" => PMC 'PGE;Match' => "aabbb" @ 3
-OUTPUT
-
pir_error_output_like( <<'CODE', qr/Null PMC access in invoke()/, 'invoking null pmc' );
.sub main :main
null $P0
More information about the parrot-commits
mailing list