Skip to content

Commit

Permalink
Some tests for marshalling and eval
Browse files Browse the repository at this point in the history
  • Loading branch information
cognominal committed Sep 17, 2009
1 parent 0f520c9 commit 31c95e9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions t/02-eval.t
@@ -0,0 +1,11 @@
# I am not sure how to execute these tests from harness.
use v6;
use Test;

plan 5;

ok 1 == eval( '1', :lang<perl5>), 'eval Integer';
ok 1 == eval( '1', :lang<perl5>), 'eval Num';
ok 'a' eq eval( '"a"', :lang<perl5>), 'eval String';
ok 'ok' eq eval( 'sub A::t { $_[1]->[0] . $_[1]->[1] }; bless {}, A', :lang<perl5> ).t( < o k > ), 'eval Array';
ok 'ok' eq eval( 'sub A::t { $_[1]->{a} }; bless {}, A', :lang<perl5> ).t( { :a<ok> } ), 'eval Hash';

2 comments on commit 31c95e9

@leto
Copy link
Collaborator

@leto leto commented on 31c95e9 Sep 17, 2009

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which languages should we be writing tests in? We are going to at least have to check that v6.pm is installed.

@leto
Copy link
Collaborator

@leto leto commented on 31c95e9 Sep 17, 2009

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should have a directory for tests written in Perl 6/v6.pm ? Then it will be easier to conditionally run them, if the requirements are met.

Please sign in to comment.