Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: coatl/rubymacros
base: 52c4ce559c
...
head fork: coatl/rubymacros
compare: 6d0fbd8e26
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Commits on Jun 07, 2011
@calebc calebc delete existing macros before starting various tests dd7f7a2
@calebc calebc loosening up some tests around parsing/unparsing form escapes in assigns
so an exact string result isn't required anymore...
amounts of whitespace allowed in output are variable now
6d0fbd8
Showing with 12 additions and 2 deletions.
  1. +6 −2 test/test_expand.rb
  2. +3 −0  test/test_form.rb
  3. +3 −0  test/test_unroll.rb
View
8 test/test_expand.rb
@@ -27,6 +27,10 @@
class ExpandTest < Test::Unit::TestCase
+ def setup
+ Macro.delete_all!
+ end
+
def test_simple_expand
Macro.eval "macro simple(a,b) :(^a+^b) end"
ttt=RedParse::CallNode[nil, "p", [RedParse::CallNode[nil, "simple", [RedParse::LiteralNode[1],
@@ -70,10 +74,10 @@ def test_expands_to_nil
def test_unparse_form_escape_on_assign_lhs
tree=Macro.parse "(^a)=^b"
- assert_equal "(^a)=^b", tree.unparse
+ assert_match( /\(\^a\) *= *\^b/, tree.unparse )
tree=Macro.parse '(^x),(^w), =^y'
- assert_equal '(^x), (^w), =^y', tree.unparse
+ assert_match( /\(\^x\), \(\^w\), *= *\^y/, tree.unparse )
end
def test_call_method_on_form
View
3  test/test_form.rb
@@ -146,6 +146,9 @@ def assert_unparses_wo_syntax_error(tree) #weak test
end
class FormParameterTest< Test::Unit::TestCase
+ def setup
+ Macro.delete_all!
+ end
DATA=[
"1", "1.1", "nil", "false", "true",
"[1,2,3]", "{'a'=>4,:b=>6}", "'s'",
View
3  test/test_unroll.rb
@@ -3,6 +3,9 @@
Macro.require 'example/unroll'
class UnrollTest<Test::Unit::TestCase
+ def setup
+ Macro.delete_all!
+ end
def setup(seed=Time.now.to_i)
srand(seed)

No commit comments for this range

Something went wrong with that request. Please try again.