#include <string.h>
static bool IsEven(int value) { return (value % 2) == 0; }
TEST(IsEvenTest, Positive) {
#ifdef INT_MIN
#endif
}
TEST(IsEvenTest, Negative) {
#ifdef INT_MAX
#endif
}
TEST(IsEvenTest, UsePred) {
}
for (int i = 0; i < 100; i += 2) {
}
for (int i = 1; i < 100; i += 2) {
}
}
TEST(IsEvenTest, DISABLED_NeverSucceed) {
}
static void ToUpper(char* text) {
char* p = text;
while (*p) {
if (*p >= 'A' && *p <= 'Z') *p += 'a' - 'A';
++p;
}
}
static void ToLower(char* text) {
char* p = text;
while (*p) {
if (*p >= 'a' && *p <= 'z') *p += 'A' - 'a';
++p;
}
}
static void Encrypt(char* text) {
char* p = text;
while (*p) {
++(*p);
++p;
}
}
static void Decrypt(char* text) {
char* p = text;
while (*p) {
--(*p);
++p;
}
}
class MyString : public ::testing::Test {
protected:
static void SetUpTestCase() {
char* p = new char[32];
original_text = p;
}
static void TearDownTestCase() {
delete[] original_text;
}
size_t n = strlen(original_text) + 1;
text = new char[n];
}
delete[] text;
}
void DoToUpper() { ToLower(text); }
void DoToLower() { ToUpper(text); }
void EncryptDecryptTest() {
Encrypt(text);
Decrypt(text);
}
static const char* original_text;
char* text;
};
const char* MyString::original_text;
TEST_F(MyString, ToUpperTest) {
DoToUpper();
}
TEST_F(MyString, ToLowerTest) {
DoToLower();
}
}
NLIB_PATHMAPPER_FORSAMPLE
bool SampleMain(int argc, char** argv) {
InitPathMapperForSample();
char path[512];
char buf[512];
size_t count;
g_PathMapper.ResolvePath(&count, path, "nlibpath:///readwrite/success.xml");
::testing::GTEST_FLAG(output) = buf;
}
NLIB_MAINFUNC