Skip to content

Commit

Permalink
Removing divergent open rules from interface testing. Fixes nasa#2733
Browse files Browse the repository at this point in the history
  • Loading branch information
LeStarch committed May 17, 2024
1 parent 63e02d5 commit 9ffdee8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 0 additions & 4 deletions Os/test/ut/file/CommonTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,7 @@ TEST_F(FunctionalIO, Preallocate) {
// Randomized testing on the interfaces
TEST_F(Functionality, RandomizedInterfaceTesting) {
// Enumerate all rules and construct an instance of each
Os::Test::File::Tester::OpenFileCreate open_file_create_rule(true);
Os::Test::File::Tester::OpenFileCreateOverwrite open_file_create_overwrite_rule(true);
Os::Test::File::Tester::OpenForWrite open_for_write_rule(true);
Os::Test::File::Tester::CloseFile close_file_rule;
Os::Test::File::Tester::CopyConstruction copy_construction;
Os::Test::File::Tester::CopyAssignment copy_assignment;
Expand All @@ -294,9 +292,7 @@ TEST_F(Functionality, RandomizedInterfaceTesting) {

// Place these rules into a list of rules
STest::Rule<Os::Test::File::Tester>* rules[] = {
&open_file_create_rule,
&open_file_create_overwrite_rule,
&open_for_write_rule,
&close_file_rule,
&copy_assignment,
&copy_construction,
Expand Down
3 changes: 2 additions & 1 deletion Os/test/ut/file/FileRules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ void Os::Test::File::Tester::OpenBaseRule::action(Os::Test::File::Tester &state

// Perform action and shadow action asserting the results are the same
Os::File::Status status = state.m_file.open(filename->c_str(), m_mode, this->m_overwrite);
ASSERT_EQ(status, state.shadow_open(*filename, m_mode, this->m_overwrite));
Os::File::Status s2 = state.shadow_open(*filename, m_mode, this->m_overwrite);
ASSERT_EQ(status, s2);

// Extra check to ensure file is consistently open
if (Os::File::Status::OP_OK == status) {
Expand Down

0 comments on commit 9ffdee8

Please sign in to comment.