File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ defmodule Gradient.ElixirTypeTest do
2+ use ExUnit.Case
3+ doctest Gradient.ElixirType
4+
5+ alias Gradient.ElixirType
6+
7+ test "pp integer()" do
8+ type = { :integer , 0 , 12 }
9+ expected = "12"
10+ actual = ElixirType . pretty_print ( type )
11+ assert expected == actual
12+ end
13+
14+ test "pp atom()" do
15+ type = { :atom , 0 , :ok }
16+ expected = ":ok"
17+ actual = ElixirType . pretty_print ( type )
18+ assert expected == actual
19+ end
20+
21+ test "pp nil()" do
22+ type = { :atom , 0 , nil }
23+ expected = "nil"
24+ actual = ElixirType . pretty_print ( type )
25+ assert expected == actual
26+ end
27+
28+ test "pp false boolean()" do
29+ type = { :atom , 0 , false }
30+ expected = "false"
31+ actual = ElixirType . pretty_print ( type )
32+ assert expected == actual
33+ end
34+
35+ test "pp true boolean()" do
36+ type = { :atom , 0 , true }
37+ expected = "true"
38+ actual = ElixirType . pretty_print ( type )
39+ assert expected == actual
40+ end
41+
42+ test "pp binary()" do
43+ type = { :type , 0 , :binary , [ ] }
44+ expected = "binary()"
45+ actual = ElixirType . pretty_print ( type )
46+ assert expected == actual
47+ end
48+ end
You can’t perform that action at this time.
0 commit comments