Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
tests/doc: fix some minor formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
flo91 committed Nov 29, 2021
1 parent a552a84 commit c6a6c76
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion doc/news/_preparation_next_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ _(Michael Tucek)_
- add tests the env binding _(Ivaylo Ivanov)_
- add and improve checks in scripts/sed _(Florian Lindner @flo91)_
- change the cpp Key-class (key.hpp) to check the return values of the called c-functions
and throw exceptions if values that indicate an error are returned + add tests that check for this exceptions _(Florian Lindner @flo91)_
and throw exceptions if values that indicate an error are returned + add tests that
check for this exceptions _(Florian Lindner @flo91)_
- <<TODO>>
- <<TODO>>
- Added more test cases for the keyCopy function _(@muskater)_
Expand Down
2 changes: 1 addition & 1 deletion src/bindings/cpp/include/key.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1711,4 +1711,4 @@ struct hash<kdb::Key>
};
} // end of namespace std

#endif
#endif
2 changes: 1 addition & 1 deletion src/bindings/cpp/tests/testcpp_key.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -784,4 +784,4 @@ TEST (key, binary)

EXPECT_THROW (x.getBinary (), KeyException);
EXPECT_EQ (b.getString (), "");
}
}
6 changes: 3 additions & 3 deletions src/bindings/cpp/tests/testcpp_ks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ TEST (ks, cErrosKeySet)
Key k ("user:/key", KEY_VALUE, "testkey", KEY_END);
KeySet ks;

ks.append(k);
ks.append (k);
EXPECT_THROW (k.addName ("test"), KeyInvalidName);
EXPECT_THROW (k.setName ("test"), KeyInvalidName);
EXPECT_THROW (k.addBaseName ("test"), KeyInvalidName);
Expand Down Expand Up @@ -766,7 +766,7 @@ TEST (ks, cErrosKeySet)

EXPECT_EQ (k.getReferenceCounter (), 2);

ks.clear();
ks.clear ();
EXPECT_EQ (k.getReferenceCounter (), 1);

/* should only fail on null key */
Expand All @@ -775,4 +775,4 @@ TEST (ks, cErrosKeySet)

/* should only fail on null key */
EXPECT_NO_THROW (k.clear ());
}
}
6 changes: 3 additions & 3 deletions src/bindings/cpp/tests/testcpp_meta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ TEST (meta, cErrorsMetaKeys)
Key m;

k.setMeta ("metaKey", "metaValue");
m = k.currentMeta();
m = k.currentMeta ();

EXPECT_THROW (m.addName ("test"), KeyInvalidName);
EXPECT_THROW (m.setName ("test"), KeyInvalidName);
Expand All @@ -224,7 +224,7 @@ TEST (meta, cErrorsMetaKeys)
EXPECT_THROW (m.delMeta ("metaKey2"), KeyException);

/* c-function 'int keyRewindMeta (Key * key)' in keymeta.c should return 0 (no error) */
EXPECT_NO_THROW (m.rewindMeta());
EXPECT_NO_THROW (m.rewindMeta ());

EXPECT_THROW (m.set ("Test"), KeyException);

Expand All @@ -246,4 +246,4 @@ TEST (meta, cErrorsMetaKeys)

/* should only fail on null key */
EXPECT_NO_THROW (m.clear ());
}
}

0 comments on commit c6a6c76

Please sign in to comment.