SmallStringTest.cpp [plain text]
#include "gtest/gtest.h"
#include "llvm/ADT/SmallString.h"
#include <stdarg.h>
#include <climits>
#include <cstring>
using namespace llvm;
namespace {
class SmallStringTest : public testing::Test {
protected:
typedef SmallString<40> StringType;
StringType theString;
void assertEmpty(StringType & v) {
EXPECT_EQ(0u, v.size());
EXPECT_TRUE(v.empty());
EXPECT_TRUE(v.begin() == v.end());
}
};
TEST_F(SmallStringTest, EmptyStringTest) {
SCOPED_TRACE("EmptyStringTest");
assertEmpty(theString);
EXPECT_TRUE(theString.rbegin() == theString.rend());
}
}