From 62e577cee9e199692d15cf741c0e29ae28f25c52 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 19 Sep 2020 15:12:08 +0200 Subject: Make use of uUnit as a submodule (dgunit renamed). --- test/atomictest.cc | 84 +++++++++++++++++++++++++++--------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) (limited to 'test/atomictest.cc') diff --git a/test/atomictest.cc b/test/atomictest.cc index 223c6f3..fd6a249 100644 --- a/test/atomictest.cc +++ b/test/atomictest.cc @@ -24,46 +24,46 @@ * along with DrumGizmo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include "dgunit.h" +#include #include class AtomicTest - : public DGUnit + : public uUnit { public: AtomicTest() { - DGUNIT_TEST(AtomicTest::podAtomicsUseStandardImpl); - DGUNIT_TEST(AtomicTest::nonPodAtomicsUseOwnImpl); - DGUNIT_TEST(AtomicTest::podAtomicCanBeDefaultInitialized); - DGUNIT_TEST(AtomicTest::nonPodAtomicCanBeDefaultInitialized); - DGUNIT_TEST(AtomicTest::podAtomicCanBeValueInitialized); - DGUNIT_TEST(AtomicTest::nonPodAtomicCanBeValueInitialized); - DGUNIT_TEST(AtomicTest::podAtomicCanBeValueAssigned); - DGUNIT_TEST(AtomicTest::nonPodAtomicCanBeValueAssigned); - DGUNIT_TEST(AtomicTest::podAtomicsAreLockFree); + uUNIT_TEST(AtomicTest::podAtomicsUseStandardImpl); + uUNIT_TEST(AtomicTest::nonPodAtomicsUseOwnImpl); + uUNIT_TEST(AtomicTest::podAtomicCanBeDefaultInitialized); + uUNIT_TEST(AtomicTest::nonPodAtomicCanBeDefaultInitialized); + uUNIT_TEST(AtomicTest::podAtomicCanBeValueInitialized); + uUNIT_TEST(AtomicTest::nonPodAtomicCanBeValueInitialized); + uUNIT_TEST(AtomicTest::podAtomicCanBeValueAssigned); + uUNIT_TEST(AtomicTest::nonPodAtomicCanBeValueAssigned); + uUNIT_TEST(AtomicTest::podAtomicsAreLockFree); } void podAtomicsUseStandardImpl() { - DGUNIT_ASSERT(isUsingStandardImpl()); - DGUNIT_ASSERT(isUsingStandardImpl()); - DGUNIT_ASSERT(isUsingStandardImpl()); - DGUNIT_ASSERT(isUsingStandardImpl()); - DGUNIT_ASSERT(isUsingStandardImpl()); - DGUNIT_ASSERT(isUsingStandardImpl()); - DGUNIT_ASSERT(isUsingStandardImpl()); - DGUNIT_ASSERT(isUsingStandardImpl()); - DGUNIT_ASSERT(isUsingStandardImpl()); - DGUNIT_ASSERT(isUsingStandardImpl()); - DGUNIT_ASSERT(isUsingStandardImpl()); - DGUNIT_ASSERT(isUsingStandardImpl()); + uUNIT_ASSERT(isUsingStandardImpl()); + uUNIT_ASSERT(isUsingStandardImpl()); + uUNIT_ASSERT(isUsingStandardImpl()); + uUNIT_ASSERT(isUsingStandardImpl()); + uUNIT_ASSERT(isUsingStandardImpl()); + uUNIT_ASSERT(isUsingStandardImpl()); + uUNIT_ASSERT(isUsingStandardImpl()); + uUNIT_ASSERT(isUsingStandardImpl()); + uUNIT_ASSERT(isUsingStandardImpl()); + uUNIT_ASSERT(isUsingStandardImpl()); + uUNIT_ASSERT(isUsingStandardImpl()); + uUNIT_ASSERT(isUsingStandardImpl()); } void nonPodAtomicsUseOwnImpl() { - DGUNIT_ASSERT(!isUsingStandardImpl()); + uUNIT_ASSERT(!isUsingStandardImpl()); } void podAtomicCanBeDefaultInitialized() @@ -76,52 +76,52 @@ public: void nonPodAtomicCanBeDefaultInitialized() { Atomic s; - DGUNIT_ASSERT_EQUAL(s.load(), std::string{}); + uUNIT_ASSERT_EQUAL(s.load(), std::string{}); } void podAtomicCanBeValueInitialized() { Atomic i{5}; - DGUNIT_ASSERT_EQUAL(i.load(), 5); + uUNIT_ASSERT_EQUAL(i.load(), 5); } void nonPodAtomicCanBeValueInitialized() { Atomic s{"hello world"}; - DGUNIT_ASSERT_EQUAL(s.load(), std::string{"hello world"}); + uUNIT_ASSERT_EQUAL(s.load(), std::string{"hello world"}); } void podAtomicCanBeValueAssigned() { Atomic i; i = 5; - DGUNIT_ASSERT_EQUAL(i.load(), 5); + uUNIT_ASSERT_EQUAL(i.load(), 5); } void nonPodAtomicCanBeValueAssigned() { Atomic s; s = "hello world"; - DGUNIT_ASSERT_EQUAL(s.load(), std::string{"hello world"}); + uUNIT_ASSERT_EQUAL(s.load(), std::string{"hello world"}); } void podAtomicsAreLockFree() { - DGUNIT_ASSERT(isLockFree()); - DGUNIT_ASSERT(isLockFree()); - DGUNIT_ASSERT(isLockFree()); - DGUNIT_ASSERT(isLockFree()); - DGUNIT_ASSERT(isLockFree()); - DGUNIT_ASSERT(isLockFree()); - DGUNIT_ASSERT(isLockFree()); - DGUNIT_ASSERT(isLockFree()); - DGUNIT_ASSERT(isLockFree()); + uUNIT_ASSERT(isLockFree()); + uUNIT_ASSERT(isLockFree()); + uUNIT_ASSERT(isLockFree()); + uUNIT_ASSERT(isLockFree()); + uUNIT_ASSERT(isLockFree()); + uUNIT_ASSERT(isLockFree()); + uUNIT_ASSERT(isLockFree()); + uUNIT_ASSERT(isLockFree()); + uUNIT_ASSERT(isLockFree()); // NOTE: Not lock free on small systems - //DGUNIT_ASSERT(isLockFree()); - //DGUNIT_ASSERT(isLockFree()); - //DGUNIT_ASSERT(isLockFree()); - //DGUNIT_ASSERT(isLockFree()); + //uUNIT_ASSERT(isLockFree()); + //uUNIT_ASSERT(isLockFree()); + //uUNIT_ASSERT(isLockFree()); + //uUNIT_ASSERT(isLockFree()); } private: -- cgit v1.2.3