-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#151 updating failing tests. More work needed on the tests themselves
- Loading branch information
Ben Vincent
committed
Dec 15, 2016
1 parent
ef51ff0
commit fdc2538
Showing
4 changed files
with
56 additions
and
37 deletions.
There are no files selected for viewing
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
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 |
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
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 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.