Created
March 3, 2017 02:03
-
-
Save paucus/497b57eee8f53955182e4ca2a08db8a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Marcelo Ruiz Camauër | |
% assignment 2.6 a26_tests | |
% invoke with 'a26_tests:test().' | |
-module(a26_tests). | |
-include_lib("eunit/include/eunit.hrl"). | |
listprod_test()-> | |
?assertEqual(1,a26:listprod([])), | |
?assertEqual(9,a26:listprod([9])), | |
?assertEqual(6,a26:listprod([1,2,3])), | |
?assertEqual(-6,a26:listprod([-1,2,3])), | |
ok. | |
listprod2_test()-> | |
?assertEqual(1,a26:listprod2([])), | |
?assertEqual(9,a26:listprod2([9])), | |
?assertEqual(6,a26:listprod2([1,2,3])), | |
?assertEqual(-6,a26:listprod2([-1,2,3])), | |
ok. | |
listmax_test()-> | |
?assertEqual(55,a26:listmax([55])), | |
?assertEqual(55,a26:listmax([55,5])), | |
?assertEqual(53,a26:listmax([12,-34,53,23,4])), | |
ok. | |
listmax2_test()-> | |
?assertEqual(55,a26:listmax2([55])), | |
?assertEqual(55,a26:listmax2([55,5])), | |
?assertEqual(53,a26:listmax2([12,-34,53,23,4])), | |
ok. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment