New Fetch

This commit is contained in:
2017-08-12 09:01:07 -05:00
parent ba838ca4fb
commit a9630f6ee8
58 changed files with 2530 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
-include_lib("eunit/include/eunit.hrl").
sut(Module) ->
{ok, Files} = file:list_dir("./src"),
case lists:member("example.erl", Files) of
true -> example;
false -> Module
end.
version_test() ->
?assertMatch(?TEST_VERSION, ?TESTED_MODULE:test_version()).

View File

@@ -0,0 +1,30 @@
%% Erlang compiler options
{erl_opts, [debug_info]}.
{deps, []}.
{dialyzer, [
{warnings, [underspecs, no_return]},
{get_warnings, true},
{plt_apps, top_level_deps}, % top_level_deps | all_deps
{plt_extra_apps, []},
{plt_location, local}, % local | "/my/file/name"
{plt_prefix, "rebar3"},
{base_plt_apps, [stdlib, kernel, crypto]},
{base_plt_location, global}, % global | "/my/file/name"
{base_plt_prefix, "rebar3"}
]}.
%% eunit:test(Tests)
{eunit_tests, []}.
%% Options for eunit:test(Tests, Opts)
{eunit_opts, [verbose]}.
%% == xref ==
{xref_warnings, true}.
%% xref checks to run
{xref_checks, [undefined_function_calls, undefined_functions,
locals_not_used, exports_not_used,
deprecated_function_calls, deprecated_functions]}.

View File

@@ -0,0 +1,9 @@
{application, hello_world,
[{description, "exercism.io - hello-world"},
{vsn, "0.0.1"},
{modules, []},
{registered, []},
{applications, [kernel,
stdlib]},
{env, []}
]}.

View File

@@ -0,0 +1,8 @@
-module(hello_world).
-export([hello/0, test_version/0]).
hello() ->
undefined.
test_version() -> 2.

View File

@@ -0,0 +1,9 @@
-module(hello_world_tests).
-define(TESTED_MODULE, (sut(hello_world))).
-define(TEST_VERSION, 2).
-include("exercism.hrl").
say_hi_test() ->
?assertEqual("Hello, World!", ?TESTED_MODULE:hello()).