Merge pull request #500 from nasa/MonteCarloUnitTest

Modified unit tests to account for new logic.
This commit is contained in:
Alex Lin 2017-11-02 14:17:51 -05:00 committed by GitHub
commit 7af2b790a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 17 deletions

View File

@ -65,22 +65,6 @@ TEST_F(MonteCarloTest, MonteVarFile_BadFileException) {
EXPECT_EQ(got_exception, true);
}
TEST_F(MonteCarloTest, MonteVarFile_FileException) {
bool got_exception = false;
try {
Trick::MonteVarFile var("time_to_fire_1", "M_jet_firings_inline", 1) ;
var.get_next_value();
var.input_file_stream->close();
var.get_next_value();
var.get_next_value();
} catch (Trick::ExecutiveException &e) {
std::cout << e.message << std::endl;
got_exception = true;
}
EXPECT_EQ(got_exception, true);
}
TEST_F(MonteCarloTest, TestMonteVarRandom_Exception) {
bool got_exception = false;

View File

@ -327,7 +327,7 @@ TEST_F(MonteCarloTest, MonteVarFile) {
Trick::MonteVarFile var0("time_to_fire_1", "M_jet_firings_inline", 2) ;
EXPECT_EQ(exec.variables.size(), 0) ;
exec.add_variable(&var0) ;
EXPECT_EQ(var0.get_next_value(), "time_to_fire_1 = 1") ;
EXPECT_EQ(var0.get_next_value(), "time_to_fire_1 = 1.0000") ;
EXPECT_EQ(exec.variables.size(), 1) ;
}