Skip to content

Commit

Permalink
[pge] Fix some method/ns confusion in tests
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/branches/pge_no_namespace_methods@43503 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
tene committed Jan 20, 2010
1 parent 0d69b6f commit 25bb23f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion t/compilers/pge/03-optable.t
Expand Up @@ -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:')
Expand Down
6 changes: 4 additions & 2 deletions t/compilers/pge/04-compile.t
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion t/compilers/pge/06-grammar.t
Expand Up @@ -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
Expand Down

0 comments on commit 25bb23f

Please sign in to comment.