Remove trailing spaces in misc sources.
Change-Id: I573d4e816112b7401b3c824fbe773b85a8601531
diff --git a/android/avd/info.c b/android/avd/info.c
index f535702..405fd04 100644
--- a/android/avd/info.c
+++ b/android/avd/info.c
@@ -893,7 +893,7 @@
_avdInfo_readPropertyFile(i, bootPropPath, i->bootProperties);
free(bootPropPath);
}
-
+
_avdInfo_extractBuildProperties(i);
/* TODO: find a way to provide better information from the build files */
diff --git a/android/avd/util.c b/android/avd/util.c
index 9ccfce9..24d5f85 100644
--- a/android/avd/util.c
+++ b/android/avd/util.c
@@ -201,7 +201,7 @@
char* end = NULL;
long levelLong = strtol(sdkVersion, &end, 10);
int level = (int)levelLong;
- if (levelLong == LONG_MIN || levelLong == LONG_MAX ||
+ if (levelLong == LONG_MIN || levelLong == LONG_MAX ||
levelLong < 0 || !end || *end || level != levelLong) {
level = kMinLevel;
D("Invalid SDK version build property: '%s'", sdkVersion);
@@ -224,7 +224,7 @@
// No ro.adb.qemud means 'legacy' ADBD.
return 0;
}
-
+
char* end;
long val = strtol(prop, &end, 10);
if (end == NULL || *end != '\0' || val != (int)val) {
diff --git a/android/avd/util.h b/android/avd/util.h
index efc6439..147b10a 100644
--- a/android/avd/util.h
+++ b/android/avd/util.h
@@ -55,7 +55,7 @@
/* Retrieves a string corresponding to the target architecture
* extracted from a build properties file.
- *
+ *
* |data| is a FileData instance holding the build.prop contents.
* Returns a new string that must be freed by the caller, which can
* be 'arm', 'x86, 'mips', etc..., or NULL if if cannot be determined.
diff --git a/android/base/EintrWrapper_unittest.cpp b/android/base/EintrWrapper_unittest.cpp
index ea259b9..2f09990 100644
--- a/android/base/EintrWrapper_unittest.cpp
+++ b/android/base/EintrWrapper_unittest.cpp
@@ -29,12 +29,12 @@
using namespace ::android::base::testing;
class EintrWrapperTest : public ::testing::Test, LogOutput {
-public:
- EintrWrapperTest() :
+public:
+ EintrWrapperTest() :
mFatal(false),
mLogged(true),
mPrevious(LogOutput::setNewOutput(this)) {}
-
+
~EintrWrapperTest() {
LogOutput::setNewOutput(mPrevious);
}
@@ -47,7 +47,7 @@
if (mFatal)
longjmp(mJumper, 1);
}
-
+
protected:
bool mFatal;
bool mLogged;
@@ -55,7 +55,7 @@
jmp_buf mJumper;
};
-
+
// Loop counter used by several functions below.
static int gLoopCount = 0;
diff --git a/android/base/Log.cpp b/android/base/Log.cpp
index c4196eb..a5be52c 100644
--- a/android/base/Log.cpp
+++ b/android/base/Log.cpp
@@ -56,7 +56,7 @@
// easier. On the other hand, it means lots of logging will impact
// performance.
fflush(stderr);
-
+
if (params.severity >= LOG_FATAL)
exit(1);
}
@@ -72,8 +72,8 @@
}
} // namespace
-
-// DCHECK level.
+
+// DCHECK level.
bool dcheckIsEnabled() {
return gDcheckLevel;
@@ -90,7 +90,7 @@
LogSeverity getMinLogLevel() {
return 0;
}
-
+
// LogString
LogString::LogString(const char* fmt, ...) : mString(NULL) {
diff --git a/android/base/Log.h b/android/base/Log.h
index 5679b1b..d1ef3d3 100644
--- a/android/base/Log.h
+++ b/android/base/Log.h
@@ -65,7 +65,7 @@
// This means LOG(severity) should expand to something that can take
// << operators on its right hand side. This is achieved with the
// ternary '? :', as implemented by this helper macro.
-//
+//
// Unfortunately, a simple thing like:
//
// !(condition) ? (void)0 : (expr)
@@ -93,7 +93,7 @@
#define LOG(severity) \
LOG_LAZY_EVAL(LOG_IS_ON(severity), \
LOG_MESSAGE_STREAM_COMPACT(severity))
-
+
// A variant of LOG() that only performs logging if a specific condition
// is encountered. Note that |condition| is only evaluated if |severity|
// is high enough. Usage example:
@@ -124,7 +124,7 @@
#define PLOG_IF(severity, condition) \
LOG_LAZY_EVAL(LOG_IS_ON(severity) && (condition), \
PLOG_MESSAGE_STREAM_COMPACT(severity))
-
+
// Evaluate |condition|, and if it fails, log a fatal message.
// This is a better version of assert(), in the future, this will
// also break directly into the debugger for debug builds.
@@ -166,7 +166,7 @@
# define ENABLE_DCHECK 2
# endif
#endif
-
+
// DLOG_IS_ON(severity) is used to indicate whether DLOG() should print
// something for the current level.
#if ENABLE_DLOG
@@ -176,7 +176,7 @@
// not compiled in the final binary.
# define DLOG_IS_ON(severity) false
#endif
-
+
// DCHECK_IS_ON() is used to indicate whether DCHECK() should do anything.
#if ENABLE_DCHECK == 0
// NOTE: Compile-time constant ensures the DCHECK() statements are
@@ -212,7 +212,7 @@
#define DCHECK(condition) \
LOG_IF(FATAL, DCHECK_IS_ON() && !(condition)) \
<< "Check failed: " #condition ". "
-
+
// Convenience class used hold a formatted string for logging reasons.
// Usage example:
//
@@ -251,7 +251,7 @@
public:
LogStream(const char* file, int lineno, LogSeverity severity);
~LogStream();
-
+
inline LogStream& operator<<(const char* str) {
append(str);
return *this;
@@ -275,7 +275,7 @@
LogStream& operator<<(unsigned long long v);
LogStream& operator<<(float v);
LogStream& operator<<(double v);
-
+
const char* string() const { return mString ? mString : ""; }
size_t size() const { return mSize; }
const LogParams& params() const { return mParams; }
@@ -347,7 +347,7 @@
LogSeverity severity,
int errnoCode);
~ErrnoLogMessage();
-
+
LogStream& stream() const { return *mStream; }
private:
LogStream* mStream;
@@ -370,10 +370,10 @@
// Abstract interface to the output where the log messages are sent.
// IMPORTANT: Only use this for unit testing the log facility.
class LogOutput {
-public:
+public:
LogOutput() {}
virtual ~LogOutput() {}
-
+
// Send a full log message to the output. Not zero terminated, and
// Does not have a trailing \n which can be added by the implementation
// when writing the message to a file.
@@ -382,7 +382,7 @@
virtual void logMessage(const LogParams& params,
const char* message,
size_t message_len) = 0;
-
+
// Set a new log output, and return pointer to the previous
// implementation, which will be NULL for the default one.
// |newOutput| is either NULL (which means the default), or a
diff --git a/android/base/Log_unittest.cpp b/android/base/Log_unittest.cpp
index c72be6b..fd25efb 100644
--- a/android/base/Log_unittest.cpp
+++ b/android/base/Log_unittest.cpp
@@ -22,8 +22,8 @@
// Create a severity level which is guaranteed to never generate a log
// message. See LogOnlyEvaluatesArgumentsIfNeeded for usage.
-const LogSeverity LOG_INVISIBLE = -10000;
-
+const LogSeverity LOG_INVISIBLE = -10000;
+
class LogTest : public ::testing::Test, android::base::testing::LogOutput {
public:
LogTest() : mFatal(false) {
@@ -32,7 +32,7 @@
mBuffer[0] = '\x7f';
mBuffer[1] = '\0';
}
-
+
~LogTest() {
::android::base::testing::LogOutput::setNewOutput(mSavedOutput);
}
@@ -70,12 +70,12 @@
#if ENABLE_DCHECK != 0
class DCheckEnabledTest : public LogTest {
-public:
+public:
DCheckEnabledTest() : LogTest() {
// Ensure DCHECKS() always run.
mSavedLevel = setDcheckLevel(true);
}
-
+
~DCheckEnabledTest() {
setDcheckLevel(mSavedLevel);
}
@@ -90,7 +90,7 @@
DCheckDisabledTest() : LogTest() {
mSavedLevel = setDcheckLevel(false);
}
-
+
~DCheckDisabledTest() {
setDcheckLevel(mSavedLevel);
}
@@ -117,7 +117,7 @@
snprintf(mExpected,
sizeof(mExpected),
"%sError message: %s",
- suffix,
+ suffix,
strerror(errnoCode));
}
@@ -125,7 +125,7 @@
const char* message,
size_t messageLen) {
LogTest::logMessage(params, message, messageLen);
-
+
if (mForcedErrno != -1000)
errno = mForcedErrno;
}
diff --git a/android/base/StringView.h b/android/base/StringView.h
index 60819da..1304c63 100644
--- a/android/base/StringView.h
+++ b/android/base/StringView.h
@@ -68,7 +68,7 @@
mString(other.data()), mSize(other.size()) {}
// IMPORTANT: This is intentionally not 'explicit'.
- StringView(const char* string) :
+ StringView(const char* string) :
mString(string), mSize(strlen(string)) {}
explicit StringView(const String& str);
diff --git a/android/base/StringView_unittest.cpp b/android/base/StringView_unittest.cpp
index 5af614d..d04499f 100644
--- a/android/base/StringView_unittest.cpp
+++ b/android/base/StringView_unittest.cpp
@@ -20,7 +20,7 @@
StringView view;
EXPECT_TRUE(view.empty());
}
-
+
TEST(StringView, InitWithCString) {
static const char kString[] = "Hello";
StringView view(kString);
@@ -91,9 +91,9 @@
StringView view(kString);
EXPECT_EQ(kString, view.begin());
EXPECT_EQ(kString + kStringLen, view.end());
-
+
size_t n = 0;
- for (StringView::const_iterator it = view.begin();
+ for (StringView::const_iterator it = view.begin();
it != view.end(); ++it, ++n) {
EXPECT_EQ(kString[n], *it);
}
@@ -110,7 +110,7 @@
EXPECT_TRUE(view1 >= view2);
EXPECT_FALSE(view1 < view2);
EXPECT_FALSE(view1 > view2);
-
+
StringView view3("hell"); // Shorter, but first char is larger.
EXPECT_FALSE(view1 == view3);
EXPECT_TRUE(view1 != view3);
@@ -118,7 +118,7 @@
EXPECT_TRUE(view1 <= view3);
EXPECT_FALSE(view1 > view3);
EXPECT_FALSE(view1 >= view3);
-
+
StringView view4("Hell"); // Shorter, but first char is smaller.
EXPECT_FALSE(view1 == view4);
EXPECT_TRUE(view1 != view4);
diff --git a/android/base/files/PathUtils.cpp b/android/base/files/PathUtils.cpp
index f07871e..e1a229f 100644
--- a/android/base/files/PathUtils.cpp
+++ b/android/base/files/PathUtils.cpp
@@ -41,7 +41,7 @@
int ch = path[0];
if ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z'))
result = 2U;
- } else if (!strncmp(path, "\\\\.\\", 4) ||
+ } else if (!strncmp(path, "\\\\.\\", 4) ||
!strncmp(path, "\\\\?\\", 4)) {
// UNC prefixes.
return 4U;
@@ -134,7 +134,7 @@
void PathUtils::simplifyComponents(StringVector* components) {
StringVector stack;
for (StringVector::const_iterator it = components->begin();
- it != components->end();
+ it != components->end();
++it) {
if (*it == ".") {
// Ignore any instance of '.' from the list.
diff --git a/android/base/files/PathUtils_unittest.cpp b/android/base/files/PathUtils_unittest.cpp
index 35528ee..d4ca2b8 100644
--- a/android/base/files/PathUtils_unittest.cpp
+++ b/android/base/files/PathUtils_unittest.cpp
@@ -172,7 +172,7 @@
} kData[] = {
{ "", { { NULL }, { NULL } } },
{ "foo", {
- { "foo", NULL },
+ { "foo", NULL },
{ "foo", NULL } } },
{ "foo/", {
{ "foo", NULL },
@@ -193,7 +193,7 @@
{ "C:", "foo", NULL },
{ "C:/", "foo", NULL } } },
{ "/foo", {
- { "/", "foo", NULL },
+ { "/", "foo", NULL },
{ "/", "foo", NULL } } },
{ "\\foo", {
{ "\\foo", NULL },
diff --git a/android/base/memory/ScopedPtr.h b/android/base/memory/ScopedPtr.h
index 4b7d00b..36ed875 100644
--- a/android/base/memory/ScopedPtr.h
+++ b/android/base/memory/ScopedPtr.h
@@ -68,7 +68,7 @@
// Return a reference to the scoped object. Allows one to
// write (*foo).DoStuff().
T& operator*() { return *mPtr; }
-
+
// Return a pointer to the scoped object. Allows one to write
// foo->DoStuff().
T* operator->() { return mPtr; }
diff --git a/android/base/memory/ScopedPtr_unittest.cpp b/android/base/memory/ScopedPtr_unittest.cpp
index af9ea0b..3cf3092 100644
--- a/android/base/memory/ScopedPtr_unittest.cpp
+++ b/android/base/memory/ScopedPtr_unittest.cpp
@@ -23,7 +23,7 @@
void DoIncrement() {
(*mCountPtr)++;
}
-
+
~Foo() {
DoIncrement();
}
diff --git a/android/cmdline-option.c b/android/cmdline-option.c
index fb5aa23..d24410b 100644
--- a/android/cmdline-option.c
+++ b/android/cmdline-option.c
@@ -165,7 +165,7 @@
{
((char**)field)[0] = *aread++;
}
- else if (oo->var_type == OPTION_IS_LIST)
+ else if (oo->var_type == OPTION_IS_LIST)
{
ParamList** head = (ParamList**)field;
ParamList* pl;
diff --git a/android/config/check-esd.c b/android/config/check-esd.c
index 684afe2..68479b6 100644
--- a/android/config/check-esd.c
+++ b/android/config/check-esd.c
@@ -38,7 +38,7 @@
#undef ESD_FUNCTION
static void* esd_lib;
-int main( void )
+int main( void )
{
int fd;
diff --git a/android/config/check-pulseaudio.c b/android/config/check-pulseaudio.c
index c696ecf..57f8e81 100644
--- a/android/config/check-pulseaudio.c
+++ b/android/config/check-pulseaudio.c
@@ -39,7 +39,7 @@
#undef PULSEAUDIO_FUNCTION
static void* pa_lib;
-int main( void )
+int main( void )
{
int fd;
diff --git a/android/loadpng.c b/android/loadpng.c
index 218ae20..5abbd7d 100644
--- a/android/loadpng.c
+++ b/android/loadpng.c
@@ -17,7 +17,7 @@
unsigned char **rowptrs = 0;
png_structp p = 0;
png_infop pi = 0;
-
+
png_uint_32 width, height;
int bitdepth, colortype, imethod, cmethod, fmethod, i;
@@ -32,7 +32,7 @@
LOG("%s: failed to allocate png info struct\n", fn);
goto oops;
}
-
+
fp = fopen(fn, "rb");
if(fp == 0) {
LOG("%s: failed to open file\n", fn);
@@ -43,7 +43,7 @@
LOG("%s: failed to read header\n", fn);
goto oops;
}
-
+
if(png_sig_cmp(header, 0, 8)) {
LOG("%s: header is not a PNG header\n", fn);
goto oops;
@@ -81,7 +81,7 @@
png_set_filler(p, 0xff, PNG_FILLER_AFTER);
}
break;
-
+
case PNG_COLOR_TYPE_RGB_ALPHA:
break;
@@ -89,7 +89,7 @@
if(bitdepth < 8) {
png_set_gray_1_2_4_to_8(p);
}
-
+
default:
LOG("%s: unsupported (grayscale?) color type\n");
goto oops;
@@ -110,17 +110,17 @@
for(i = 0; i < height; i++) {
rowptrs[i] = data + ((width * 4) * i);
}
-
+
png_read_image(p, rowptrs);
-
+
png_destroy_read_struct(&p, &pi, 0);
fclose(fp);
if(rowptrs != 0) free(rowptrs);
*_width = width;
*_height = height;
-
- return (void*) data;
+
+ return (void*) data;
}
@@ -251,7 +251,7 @@
*_width = width;
*_height = height;
- return (void*) data;
+ return (void*) data;
}
@@ -260,7 +260,7 @@
{
unsigned w,h;
unsigned char *data;
-
+
if(argc < 2) return 0;
diff --git a/android/main-emulator.c b/android/main-emulator.c
index 3436a3c..150fe1e 100644
--- a/android/main-emulator.c
+++ b/android/main-emulator.c
@@ -137,7 +137,7 @@
if (androidOut != NULL) {
D("Found ANDROID_PRODUCT_OUT: %s\n", androidOut);
avdArch = path_getBuildTargetArch(androidOut);
- D("Found build target architecture: %s\n",
+ D("Found build target architecture: %s\n",
avdArch ? avdArch : "<NULL>");
}
}
diff --git a/android/main.c b/android/main.c
index de52a7a..0662bfe 100644
--- a/android/main.c
+++ b/android/main.c
@@ -988,7 +988,7 @@
args[n++] = "off";
}
- /* Pass boot properties to the core. First, those from boot.prop,
+ /* Pass boot properties to the core. First, those from boot.prop,
* then those from the command-line */
const FileData* bootProperties = avdInfo_getBootProperties(avd);
if (!fileData_isEmpty(bootProperties)) {
@@ -1003,7 +1003,7 @@
args[n++] = ASTRDUP(temp);
}
}
-
+
if (opts->prop != NULL) {
ParamList* pl = opts->prop;
for ( ; pl != NULL; pl = pl->next ) {
diff --git a/android/user-config.c b/android/user-config.c
index acd1a27..8cdbf78 100644
--- a/android/user-config.c
+++ b/android/user-config.c
@@ -64,7 +64,7 @@
if (inAndroidBuild) {
p = bufprint_config_file(temp, end, USER_CONFIG_FILE);
} else {
- p = bufprint(temp, end, "%s/%s", avdInfo_getContentPath(info),
+ p = bufprint(temp, end, "%s/%s", avdInfo_getContentPath(info),
USER_CONFIG_FILE);
}
diff --git a/android/utils/file_data.c b/android/utils/file_data.c
index 4c277b3..506c4f6 100644
--- a/android/utils/file_data.c
+++ b/android/utils/file_data.c
@@ -61,20 +61,20 @@
FILE* f = fopen(filePath, "rb");
if (!f)
return -errno;
-
+
int ret = 0;
do {
if (fseek(f, 0, SEEK_END) < 0) {
ret = -errno;
break;
}
-
+
long fileSize = ftell(f);
if (fileSize < 0) {
ret = -errno;
break;
}
-
+
if (fileSize == 0) {
fileData_initEmpty(data);
break;
@@ -84,13 +84,13 @@
ret = -errno;
break;
}
-
+
char* buffer = malloc((size_t)fileSize);
if (!buffer) {
ret = -errno;
break;
}
-
+
size_t readLen = fread(buffer, 1, (size_t)fileSize, f);
if (readLen != (size_t)fileSize) {
if (feof(f)) {
@@ -100,11 +100,11 @@
}
break;
}
-
+
fileData_initWith(data, buffer, readLen);
} while (0);
-
+
fclose(f);
return ret;
}
@@ -122,12 +122,12 @@
if (!copy) {
return -errno;
}
-
+
memcpy(copy, other->data, other->size);
fileData_initWith(data, copy, other->size);
return 0;
}
-
+
int fileData_initFromMemory(FileData* data,
const void* input,
@@ -146,7 +146,7 @@
uint8_t* buffer = data->data;
data->data = other->data;
other->data = buffer;
-
+
size_t size = data->size;
data->size = other->size;
other->size = size;
@@ -157,7 +157,7 @@
if (!fileData_isValid(data)) {
APANIC("Trying to finalize an un-initialized FileData instance\n");
}
-
+
free(data->data);
fileData_initWith(data, NULL, 0);
fileData_setInvalid(data);
diff --git a/android/utils/file_data_unittest.cpp b/android/utils/file_data_unittest.cpp
index 52bdae7..bb8a081 100644
--- a/android/utils/file_data_unittest.cpp
+++ b/android/utils/file_data_unittest.cpp
@@ -20,7 +20,7 @@
ScopedFileData(const void* buff, size_t length) {
mStatus = fileData_initFromMemory(&mFileData, buff, length);
}
-
+
explicit ScopedFileData(const ScopedFileData& other) {
mStatus = fileData_initFrom(&mFileData, other.ptr());
}
@@ -28,9 +28,9 @@
explicit ScopedFileData(const FileData* other) {
mStatus = fileData_initFrom(&mFileData, other);
}
-
+
~ScopedFileData() { fileData_done(&mFileData); }
-
+
int status() const { return mStatus; }
FileData* ptr() { return &mFileData; }
const FileData* ptr() const { return &mFileData; }
@@ -43,7 +43,7 @@
TEST(FileData, IsValid) {
EXPECT_FALSE(fileData_isValid(NULL));
-
+
FileData fakeData = { (uint8_t*)0x012345678, 12345, 23983 };
EXPECT_FALSE(fileData_isValid(&fakeData));
}
@@ -92,7 +92,7 @@
ScopedFileData data2(data1.ptr());
EXPECT_EQ(0, data2.status());
-
+
EXPECT_EQ(data1->size, data2->size);
EXPECT_NE(data1->data, data2->data);
for (size_t n = 0; n < data1->size; ++n) {
@@ -109,7 +109,7 @@
ScopedFileData data2;
EXPECT_EQ(0, data2.status());
fileData_swap(data1.ptr(), data2.ptr());
-
+
EXPECT_TRUE(fileData_isEmpty(data1.ptr()));
EXPECT_FALSE(fileData_isEmpty(data2.ptr()));
EXPECT_EQ(sizeof kData, data2->size);
diff --git a/android/utils/property_file.c b/android/utils/property_file.c
index 2e34678..3ac53e8 100644
--- a/android/utils/property_file.c
+++ b/android/utils/property_file.c
@@ -45,7 +45,7 @@
} else {
p = lineEnd + 1;
}
-
+
// Remove trailing \r before the \n, if any.
if (lineEnd > line && lineEnd[-1] == '\r')
lineEnd--;
@@ -53,13 +53,13 @@
// Skip leading whitespace.
while (line < lineEnd && isspace(line[0]))
line++;
-
+
// Skip empty lines, and those that begin with '#' for comments.
if (lineEnd == line || line[0] == '#')
continue;
const char* name = line;
- const char* nameEnd =
+ const char* nameEnd =
(const char*)memchr(name, '=', lineEnd - name);
if (!nameEnd) {
// Skipping lines without a =
@@ -68,7 +68,7 @@
const char* value = nameEnd + 1;
while (nameEnd > name && isspace(nameEnd[-1]))
nameEnd--;
-
+
size_t nameLen = nameEnd - name;
if (nameLen == 0 || nameLen >= MAX_PROPERTY_NAME_LEN) {
// Skip lines without names, or with names too long.
@@ -77,15 +77,15 @@
memcpy(iter->name, name, nameLen);
iter->name[nameLen] = '\0';
-
+
// Truncate value's length.
size_t valueLen = (lineEnd - value);
if (valueLen >= MAX_PROPERTY_VALUE_LEN)
valueLen = (MAX_PROPERTY_VALUE_LEN - 1);
-
+
memcpy(iter->value, value, valueLen);
iter->value[valueLen] = '\0';
-
+
iter->p = p;
return true;
}
diff --git a/android/utils/property_file_unittest.cpp b/android/utils/property_file_unittest.cpp
index 006eade..7877f38 100644
--- a/android/utils/property_file_unittest.cpp
+++ b/android/utils/property_file_unittest.cpp
@@ -34,7 +34,7 @@
String value(propertyFile_getValue(kFile, sizeof kFile, "foo"));
EXPECT_TRUE(value.str());
EXPECT_STREQ("bar", value.str());
-
+
String value2(propertyFile_getValue(kFile, sizeof kFile, "bar"));
EXPECT_FALSE(value2.str());
}
@@ -44,7 +44,7 @@
String value(propertyFile_getValue(kFile, sizeof kFile, "foo"));
EXPECT_TRUE(value.str());
EXPECT_STREQ("bar", value.str());
-
+
String value2(propertyFile_getValue(kFile, sizeof kFile, "bar"));
EXPECT_FALSE(value2.str());
}
@@ -54,11 +54,11 @@
"foo=bar\n"
"bar=zoo\n"
"sdk=4.2\n";
-
+
String foo(propertyFile_getValue(kFile, sizeof kFile, "foo"));
String bar(propertyFile_getValue(kFile, sizeof kFile, "bar"));
String sdk(propertyFile_getValue(kFile, sizeof kFile, "sdk"));
-
+
EXPECT_STREQ("bar", foo.str());
EXPECT_STREQ("zoo", bar.str());
EXPECT_STREQ("4.2", sdk.str());
@@ -69,11 +69,11 @@
"foo=bar\n"
"bar=zoo\n"
"sdk=4.2";
-
+
String foo(propertyFile_getValue(kFile, sizeof kFile, "foo"));
String bar(propertyFile_getValue(kFile, sizeof kFile, "bar"));
String sdk(propertyFile_getValue(kFile, sizeof kFile, "sdk"));
-
+
EXPECT_STREQ("bar", foo.str());
EXPECT_STREQ("zoo", bar.str());
EXPECT_STREQ("4.2", sdk.str());
@@ -84,11 +84,11 @@
"foo=bar\r\n"
"bar=zoo\r\n"
"sdk=4.2\n";
-
+
String foo(propertyFile_getValue(kFile, sizeof kFile, "foo"));
String bar(propertyFile_getValue(kFile, sizeof kFile, "bar"));
String sdk(propertyFile_getValue(kFile, sizeof kFile, "sdk"));
-
+
EXPECT_STREQ("bar", foo.str());
EXPECT_STREQ("zoo", bar.str());
EXPECT_STREQ("4.2", sdk.str());
@@ -120,7 +120,7 @@
}
TEST(PropertyFile, Iterator) {
- static const char kFile[] =
+ static const char kFile[] =
"foo=bar\n"
"this-name-is-too-long-and-will-be-ignored-by-the-parser=ahah\n"
"foo2=this-value-is-too-long-and-will-be-truncated-by-the-parser"
@@ -134,19 +134,19 @@
EXPECT_TRUE(propertyFileIterator_next(iter));
EXPECT_STREQ("foo", iter->name);
EXPECT_STREQ("bar", iter->value);
-
+
EXPECT_TRUE(propertyFileIterator_next(iter));
EXPECT_STREQ("foo2", iter->name);
EXPECT_STREQ("this-value-is-too-long-and-will-be-truncated-by-the-"
"parser-which-only-wants-something-small", iter->value);
-
+
EXPECT_TRUE(propertyFileIterator_next(iter));
EXPECT_STREQ("foo3", iter->name);
EXPECT_STREQ("bar", iter->value);
-
+
EXPECT_TRUE(propertyFileIterator_next(iter));
EXPECT_STREQ("bar", iter->name);
EXPECT_STREQ(" zoo", iter->value);
-
+
EXPECT_FALSE(propertyFileIterator_next(iter));
}