Skip to content

Instantly share code, notes, and snippets.

@StoneCypher
Created February 2, 2014 22:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StoneCypher/8775605 to your computer and use it in GitHub Desktop.
Save StoneCypher/8775605 to your computer and use it in GitHub Desktop.
-module(dumb_math_tests).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
square_test_() ->
{ "Square tests", [
{ "Zero", ?_assert( 0 =:= dumb_math:square(0) ) },
{ "Two", ?_assert( 4 =:= dumb_math:square(2) ) },
{ "Neg Two", ?_assert( 4 =:= dumb_math:square(-2) ) },
{ "One and a half", ?_assert( 2.25 =:= dumb_math:square(1.5) ) }
] }.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment