AUnit  1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
Macros
gtest.h File Reference

A simple adapter which allows basic unit tests written using Google Test API (https://github.com/google/googletest) to run on Arduino platforms using AUnit. More...

Go to the source code of this file.

Macros

#define TEST(category, name)   test(category##_##name)
 
#define ASSERT_EQ(e, a)   assertEqual(static_cast<decltype(a)>(e), a)
 
#define ASSERT_NE(e, a)   assertNotEqual(static_cast<decltype(a)>(e), a)
 
#define ASSERT_LT(e, a)   assertLess(static_cast<decltype(a)>(e), a)
 
#define ASSERT_GT(e, a)   assertMore(static_cast<decltype(a)>(e), a)
 
#define ASSERT_LE(e, a)   assertLessOrEqual(static_cast<decltype(a)>(e), a)
 
#define ASSERT_GE(e, a)   assertMoreOrEqual(static_cast<decltype(a)>(e), a)
 
#define ASSERT_STREQ(e, a)   assertEqual(static_cast<decltype(a)>(e), a)
 
#define ASSERT_STRNE(e, a)   assertNotEqual(static_cast<decltype(a)>(e), a)
 
#define ASSERT_STRCASEEQ(e, a)    assertStringCaseEqual(static_cast<decltype(a)>(e), a)
 
#define ASSERT_STRCASENE(e, a)    assertStringCaseNotEqual(static_cast<decltype(a)>(e), a)
 
#define ASSERT_TRUE(x)   assertTrue(x)
 
#define ASSERT_FALSE(x)   assertFalse(x)
 
#define ASSERT_NEAR(e, a, error)   assertNear(static_cast<decltype(a)>(e), a, static_cast<decltype(a)>(error))
 

Detailed Description

A simple adapter which allows basic unit tests written using Google Test API (https://github.com/google/googletest) to run on Arduino platforms using AUnit.

This is not a comprehensive mapping layer. Only the TEST() macro is supported, TEST_F() is not supported. Many of the ASSERT_Xxx() macros are missing. Over time, more mapping macros may be added.

Usage:

#include <AUnit.h>
Same as AUnitVerbose.h except that the terse versions of the various assertXxx() macros are provided.
A simple adapter which allows basic unit tests written using Google Test API (https://github....

or

#include <AUnitVerbose.h>
Same as AUnit.h except that the verbose versions of the various assertXxx() macros are provided.

Definition in file gtest.h.