-
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.
Rather obscure error that occurred only with MixedModels and when the point estimate was ‘mode’ Added a regression test to test_Stochastic.m
- Loading branch information
Ben Vincent
committed
May 14, 2017
1 parent
95e8dc0
commit f527ccb
Showing
2 changed files
with
21 additions
and
2 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
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,19 @@ | ||
classdef test_Stochastic < matlab.unittest.TestCase | ||
|
||
properties | ||
end | ||
|
||
methods (Test, TestTags = {'Unit'}) | ||
|
||
function check_mode_is_NaN_when_NaN_samples_provided(testCase) | ||
% when we provide NaN as samples to a Stochastic object, check | ||
% we set obj.mode as NaN | ||
univariateObject = Stochastic('testVariable'); | ||
samples = NaN; | ||
univariateObject.addSamples(samples); | ||
|
||
testCase.verifyEqual( univariateObject.mode, NaN ) | ||
end | ||
|
||
end | ||
end |