From c6a6c760479855a356f3dd41b76cabed93e7daa8 Mon Sep 17 00:00:00 2001 From: flo91 Date: Tue, 23 Nov 2021 01:24:48 +0100 Subject: [PATCH] tests/doc: fix some minor formatting issues --- doc/news/_preparation_next_release.md | 3 ++- src/bindings/cpp/include/key.hpp | 2 +- src/bindings/cpp/tests/testcpp_key.cpp | 2 +- src/bindings/cpp/tests/testcpp_ks.cpp | 6 +++--- src/bindings/cpp/tests/testcpp_meta.cpp | 6 +++--- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/doc/news/_preparation_next_release.md b/doc/news/_preparation_next_release.md index 3d05b1fa768..b1b7bb555a0 100644 --- a/doc/news/_preparation_next_release.md +++ b/doc/news/_preparation_next_release.md @@ -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)_ - <> - <> - Added more test cases for the keyCopy function _(@muskater)_ diff --git a/src/bindings/cpp/include/key.hpp b/src/bindings/cpp/include/key.hpp index 59486480d44..ea54ce89ffa 100644 --- a/src/bindings/cpp/include/key.hpp +++ b/src/bindings/cpp/include/key.hpp @@ -1711,4 +1711,4 @@ struct hash }; } // end of namespace std -#endif \ No newline at end of file +#endif diff --git a/src/bindings/cpp/tests/testcpp_key.cpp b/src/bindings/cpp/tests/testcpp_key.cpp index 451dd6125a0..7777a8ab41b 100644 --- a/src/bindings/cpp/tests/testcpp_key.cpp +++ b/src/bindings/cpp/tests/testcpp_key.cpp @@ -784,4 +784,4 @@ TEST (key, binary) EXPECT_THROW (x.getBinary (), KeyException); EXPECT_EQ (b.getString (), ""); -} \ No newline at end of file +} diff --git a/src/bindings/cpp/tests/testcpp_ks.cpp b/src/bindings/cpp/tests/testcpp_ks.cpp index 8804b4ee827..826f58cee18 100644 --- a/src/bindings/cpp/tests/testcpp_ks.cpp +++ b/src/bindings/cpp/tests/testcpp_ks.cpp @@ -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); @@ -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 */ @@ -775,4 +775,4 @@ TEST (ks, cErrosKeySet) /* should only fail on null key */ EXPECT_NO_THROW (k.clear ()); -} \ No newline at end of file +} diff --git a/src/bindings/cpp/tests/testcpp_meta.cpp b/src/bindings/cpp/tests/testcpp_meta.cpp index 156755c0f15..60ec0f0318d 100644 --- a/src/bindings/cpp/tests/testcpp_meta.cpp +++ b/src/bindings/cpp/tests/testcpp_meta.cpp @@ -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); @@ -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); @@ -246,4 +246,4 @@ TEST (meta, cErrorsMetaKeys) /* should only fail on null key */ EXPECT_NO_THROW (m.clear ()); -} \ No newline at end of file +}