Skip to content

Commit

Permalink
#151 updating failing tests. More work needed on the tests themselves
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Vincent committed Dec 15, 2016
1 parent ef51ff0 commit fdc2538
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 37 deletions.
26 changes: 26 additions & 0 deletions tests/test_DF_Hyperbolic1.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
classdef test_DF_Hyperbolic1 < matlab.unittest.TestCase

properties
end

methods (Test, TestTags = {'Unit'})

function scalarInput(testCase)

% evaluate with these paraams
logk = 1/365;
delay = 365;
expected_discount_fraction = 0.5;

% construct discount function object
my_func = DF_Hyperbolic1('samples', struct('logk', logk) );

testCase.verifyEqual(...
my_func.eval(delay),...
expected_discount_fraction,...
'RelTol', 0.0001)

end

end
end
30 changes: 30 additions & 0 deletions tests/test_MagnitudeEffectFunction.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
classdef test_MagnitudeEffectFunction < matlab.unittest.TestCase

properties
end

methods (Test, TestTags = {'Unit'})

function scalar_input(testCase)


% evaluate with these paraams
m = 0;
c = randn*10;
expected_answer = []; % ??????

reward_magnitide = 100;

% construct discount function object
my_func = MagnitudeEffectFunction('samples', struct('m', m, 'c', c) );

testCase.verifyEqual(...
my_func.eval(reward_magnitide),...
expected_answer,...
'RelTol', 0.0001)


end

end
end
19 changes: 0 additions & 19 deletions tests/test_discountFraction_Hyperbolic1.m

This file was deleted.

18 changes: 0 additions & 18 deletions tests/test_magnitudeEffect.m

This file was deleted.

0 comments on commit fdc2538

Please sign in to comment.