Skip to content

Instantly share code, notes, and snippets.

@tcrayford
Created February 1, 2013 04:13
Show Gist options
  • Save tcrayford/4689152 to your computer and use it in GitHub Desktop.
Save tcrayford/4689152 to your computer and use it in GitHub Desktop.
ExUnit.start
defmodule MacroExpansionTest do
use ExUnit.Case
defmacro a_macro(_) do
quote do
1 + 1
end
end
test "doesn't macroexpand like I'd expect" do
IO.inspect (Macro.to_binary (Macro.expand quote(do: a_macro(1)), __ENV__))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment