Skip to content

Commit

Permalink
[C] [tests] Reorderd more lines of field metainfo test
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Hovy committed Mar 8, 2018
1 parent cacd805 commit c83f59d
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions test/serialbox-c/UnittestFortranWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,6 @@ TEST_F(CFortranWrapperTest, FieldMetainfoImpl) {
serialboxFortranSerializerRegisterField(serializer, "field", Float64, 8, 30, 40, 50, 60, 1, 1, 23,
42, 0, 0, -2, 2);


//
// Field does not exists -> Error
//
serialboxFortranSerializerAddFieldMetainfoBoolean(serializer, "fieldX", "bool", true);
ASSERT_TRUE(this->hasErrorAndReset()) << this->getLastErrorMsg();

//
// Add existing field meta-info -> Error
//
serialboxFortranSerializerAddFieldMetainfoBoolean(serializer, "field", "bool", true);
ASSERT_TRUE(this->hasErrorAndReset()) << this->getLastErrorMsg();

// Rank
int rank;
serialboxFortranSerializerGetFieldRank(serializer, "field", &rank);
Expand Down Expand Up @@ -156,6 +143,18 @@ TEST_F(CFortranWrapperTest, FieldMetainfoImpl) {
serialboxFortranSerializerAddFieldMetainfoString(serializer, "field", "string", "strf");
ASSERT_FALSE(this->hasErrorAndReset()) << this->getLastErrorMsg();

//
// Field does not exists -> Error
//
serialboxFortranSerializerAddFieldMetainfoBoolean(serializer, "fieldX", "bool", true);
ASSERT_TRUE(this->hasErrorAndReset()) << this->getLastErrorMsg();

//
// Add existing field meta-info -> Error
//
serialboxFortranSerializerAddFieldMetainfoBoolean(serializer, "field", "bool", true);
ASSERT_TRUE(this->hasErrorAndReset()) << this->getLastErrorMsg();

//
// Get field meta-info
//
Expand Down

0 comments on commit c83f59d

Please sign in to comment.