From 25bb23fccbc797ad96bfa92bc70b7c07bb6a032f Mon Sep 17 00:00:00 2001 From: Stephen Weeks Date: Wed, 20 Jan 2010 07:53:53 +0000 Subject: [PATCH] [pge] Fix some method/ns confusion in tests git-svn-id: https://svn.parrot.org/parrot/branches/pge_no_namespace_methods@43503 d31e2699-5ff4-0310-a27c-f18f2fbe73fe --- t/compilers/pge/03-optable.t | 3 ++- t/compilers/pge/04-compile.t | 6 ++++-- t/compilers/pge/06-grammar.t | 4 +++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/t/compilers/pge/03-optable.t b/t/compilers/pge/03-optable.t index 77d837c117..de634063f1 100644 --- a/t/compilers/pge/03-optable.t +++ b/t/compilers/pge/03-optable.t @@ -103,7 +103,8 @@ optable.'newtok'('prefix:-', 'equiv'=>'prefix:++') .local pmc ident - ident = get_global ['PGE';'Match'], 'ident' + $P0 = get_hll_global ['PGE'], 'Match' + ident = find_method $P0, 'ident' optable.'newtok'('term:', 'tighter'=>'prefix:++', 'parsed'=>ident) optable.'newtok'('circumfix:( )', 'equiv'=>'term:') optable.'newtok'('circumfix:[ ]', 'equiv'=>'term:') diff --git a/t/compilers/pge/04-compile.t b/t/compilers/pge/04-compile.t index bcdc0a3559..3b7ab39183 100644 --- a/t/compilers/pge/04-compile.t +++ b/t/compilers/pge/04-compile.t @@ -58,7 +58,8 @@ Tests various arguments to the compiler. .local pmc p6compiler p6compiler = compreg 'PGE::Perl6Regex' $P1 = p6compiler('.+', 'name'=>'xyz1', 'grammar'=>'PGE::Test') - $P2 = get_hll_global ['PGE';'Test'], 'xyz1' + $P0 = get_hll_global ['PGE'], 'Test' + $P2 = find_method $P0, 'xyz1' $P3 = $P2('ok 1') is($P3, 'ok 1', 'compile into a new grammar') .end @@ -71,7 +72,8 @@ Tests various arguments to the compiler. p6compiler = compreg 'PGE::Perl6Regex' $P1 = p6compiler('.+', 'name'=>'abc', 'grammar'=>'PGE::Test') $P1 = p6compiler('.+', 'name'=>'xyz2', 'grammar'=>'PGE::Test') - $P2 = get_hll_global ['PGE';'Test'], 'abc' + $P0 = get_hll_global ['PGE'], 'Test' + $P2 = find_method $P0, 'abc' $P3 = $P2('ok 1') is($P3, 'ok 1', 'compile into a new grammar, 2x') .end diff --git a/t/compilers/pge/06-grammar.t b/t/compilers/pge/06-grammar.t index 550f412736..8df9bfbe58 100644 --- a/t/compilers/pge/06-grammar.t +++ b/t/compilers/pge/06-grammar.t @@ -141,8 +141,10 @@ EOF_SIMPLE_GRAMMAR test_name = 'Simple::Test' . test_num_str $P0 = split '::', test_name + $S0 = pop $P0 .local pmc parser - parser = get_hll_global $P0, 'main' + parser = get_hll_global $P0, $S0 + parser = find_method parser, 'main' next_target: .local string target