Skip to content

Commit

Permalink
* Updated rebar to rebar3
Browse files Browse the repository at this point in the history
* Update typespec dict to dict:dict
  • Loading branch information
BillBarnhill committed Mar 22, 2019
1 parent eb96b75 commit cae3909
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Binary file added rebar3
Binary file not shown.
11 changes: 7 additions & 4 deletions src/lsys.erl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
-include_lib("eunit/include/eunit.hrl").
-endif.

-type config() :: dict().
-type rules() :: dict().
-type config() :: dict:dict().
-type rules() :: dict:dict().
-type constant() :: char() | [].
-type variable() :: char().

Expand Down Expand Up @@ -90,11 +90,14 @@ if_in(Member, List, ExprTrue, ExprFalse) ->

base_test() ->
io:format("~p~n", [file:get_cwd()]),
{ok, Config} = read_config(["../priv"], "test1.lsys"),
{ok, Config} = read_config(["./priv"], "test1.lsys"),
Axiom = "S0",
Iters = 3,
?assertEqual("1111[11[1[0]0]1[0]0]11[1[0]0]1[0]0", generate(Iters, Axiom, Config)).
io:format("~p~n~n", [generate(Iters, Axiom, Config)]).

-endif.

-ifdef (TEST).
srv_test() ->
application:start(lsys),
{ok, Config} = read_config([code:priv_dir(lsys)], "test1.lsys"),
Expand Down

0 comments on commit cae3909

Please sign in to comment.