diff options
author | montellese <montellese@xbmc.org> | 2012-09-07 13:20:03 +0200 |
---|---|---|
committer | montellese <montellese@xbmc.org> | 2012-10-15 21:13:32 +0200 |
commit | 39af00252648b4cafa117798301d02a00c1a19d8 (patch) | |
tree | 11c6d0c869066970cf02771cf20e6064a4855800 | |
parent | 76f150476f2b9e0eccb9369384251745d0800bd7 (diff) |
[test] use std::endl instead of \n with std::cout
-rw-r--r-- | xbmc/filesystem/test/TestFileFactory.cpp | 28 | ||||
-rw-r--r-- | xbmc/filesystem/test/TestRarFile.cpp | 15 | ||||
-rw-r--r-- | xbmc/filesystem/test/TestZipFile.cpp | 15 | ||||
-rw-r--r-- | xbmc/utils/test/TestCPUInfo.cpp | 2 | ||||
-rw-r--r-- | xbmc/utils/test/TestDownloadQueue.cpp | 4 | ||||
-rw-r--r-- | xbmc/utils/test/TestDownloadQueueManager.cpp | 8 | ||||
-rw-r--r-- | xbmc/utils/test/TestFileOperationJob.cpp | 7 | ||||
-rw-r--r-- | xbmc/utils/test/TestPerformanceSample.cpp | 6 | ||||
-rw-r--r-- | xbmc/utils/test/TestStopwatch.cpp | 36 | ||||
-rw-r--r-- | xbmc/utils/test/TestStringUtils.cpp | 2 | ||||
-rw-r--r-- | xbmc/utils/test/TestSystemInfo.cpp | 60 | ||||
-rw-r--r-- | xbmc/utils/test/TestTimeUtils.cpp | 14 | ||||
-rw-r--r-- | xbmc/utils/test/TestURIUtils.cpp | 2 |
13 files changed, 98 insertions, 101 deletions
diff --git a/xbmc/filesystem/test/TestFileFactory.cpp b/xbmc/filesystem/test/TestFileFactory.cpp index 0ab58376cc..076bbc36dc 100644 --- a/xbmc/filesystem/test/TestFileFactory.cpp +++ b/xbmc/filesystem/test/TestFileFactory.cpp @@ -73,17 +73,17 @@ TEST_F(TestFileFactory, Read) std::vector<CStdString>::iterator it; for (it = urls.begin(); it < urls.end(); it++) { - std::cout << "Testing URL: " << *it << "\n"; + std::cout << "Testing URL: " << *it << std::endl; ASSERT_TRUE(file.Open(*it)); std::cout << "file.GetLength(): " << - testing::PrintToString(file.GetLength()) << "\n"; + testing::PrintToString(file.GetLength()) << std::endl; std::cout << "file.Seek(file.GetLength() / 2, SEEK_CUR) return value: " << - testing::PrintToString(file.Seek(file.GetLength() / 2, SEEK_CUR)) << "\n"; + testing::PrintToString(file.Seek(file.GetLength() / 2, SEEK_CUR)) << std::endl; std::cout << "file.Seek(0, SEEK_END) return value: " << - testing::PrintToString(file.Seek(0, SEEK_END)) << "\n"; + testing::PrintToString(file.Seek(0, SEEK_END)) << std::endl; std::cout << "file.Seek(0, SEEK_SET) return value: " << - testing::PrintToString(file.Seek(0, SEEK_SET)) << "\n"; - std::cout << "File contents:\n"; + testing::PrintToString(file.Seek(0, SEEK_SET)) << std::endl; + std::cout << "File contents:" << std::endl; while ((size = file.Read(buf, sizeof(buf))) > 0) { str.Format(" %08X", count); @@ -104,7 +104,7 @@ TEST_F(TestFileFactory, Read) else std::cout << "."; } - std::cout << "]\n"; + std::cout << "]" << std::endl; } file.Close(); } @@ -127,7 +127,7 @@ TEST_F(TestFileFactory, Write) std::vector<CStdString>::iterator it; for (it = urls.begin(); it < urls.end(); it++) { - std::cout << "Testing URL: " << *it << "\n"; + std::cout << "Testing URL: " << *it << std::endl; std::cout << "Writing..."; ASSERT_TRUE(file.OpenForWrite(*it, true)); while ((size = inputfile.Read(buf, sizeof(buf))) > 0) @@ -135,16 +135,16 @@ TEST_F(TestFileFactory, Write) EXPECT_GE(file.Write(buf, size), 0); } file.Close(); - std::cout << "done.\n"; - std::cout << "Reading...\n"; + std::cout << "done." << std::endl; + std::cout << "Reading..." << std::endl; ASSERT_TRUE(file.Open(*it)); EXPECT_EQ(inputfile.GetLength(), file.GetLength()); std::cout << "file.Seek(file.GetLength() / 2, SEEK_CUR) return value: " << - testing::PrintToString(file.Seek(file.GetLength() / 2, SEEK_CUR)) << "\n"; + testing::PrintToString(file.Seek(file.GetLength() / 2, SEEK_CUR)) << std::endl; std::cout << "file.Seek(0, SEEK_END) return value: " << - testing::PrintToString(file.Seek(0, SEEK_END)) << "\n"; + testing::PrintToString(file.Seek(0, SEEK_END)) << std::endl; std::cout << "file.Seek(0, SEEK_SET) return value: " << - testing::PrintToString(file.Seek(0, SEEK_SET)) << "\n"; + testing::PrintToString(file.Seek(0, SEEK_SET)) << std::endl; std::cout << "File contents:\n"; while ((size = file.Read(buf, sizeof(buf))) > 0) { @@ -166,7 +166,7 @@ TEST_F(TestFileFactory, Write) else std::cout << "."; } - std::cout << "]\n"; + std::cout << "]" << std::endl; } file.Close(); } diff --git a/xbmc/filesystem/test/TestRarFile.cpp b/xbmc/filesystem/test/TestRarFile.cpp index dda921d1db..f96bdc38d5 100644 --- a/xbmc/filesystem/test/TestRarFile.cpp +++ b/xbmc/filesystem/test/TestRarFile.cpp @@ -130,8 +130,7 @@ TEST(TestRarFile, CorruptedFile) reffilepath = XBMC_REF_FILE_PATH("xbmc/filesystem/test/reffile.txt.rar"); ASSERT_TRUE((file = XBMC_CREATECORRUPTEDFILE(reffilepath, ".rar")) != NULL); - std::cout << "Reference file generated at '" << XBMC_TEMPFILEPATH(file) << - "'\n"; + std::cout << "Reference file generated at '" << XBMC_TEMPFILEPATH(file) << "'" << std::endl; URIUtils::CreateArchivePath(strrarpath, "rar", XBMC_TEMPFILEPATH(file), ""); if (!XFILE::CDirectory::GetDirectory(strrarpath, itemlist, "", @@ -156,14 +155,14 @@ TEST(TestRarFile, CorruptedFile) return; } std::cout << "file->GetLength(): " << - testing::PrintToString(file->GetLength()) << "\n"; + testing::PrintToString(file->GetLength()) << std::endl; std::cout << "file->Seek(file->GetLength() / 2, SEEK_CUR) return value: " << - testing::PrintToString(file->Seek(file->GetLength() / 2, SEEK_CUR)) << "\n"; + testing::PrintToString(file->Seek(file->GetLength() / 2, SEEK_CUR)) << std::endl; std::cout << "file->Seek(0, SEEK_END) return value: " << - testing::PrintToString(file->Seek(0, SEEK_END)) << "\n"; + testing::PrintToString(file->Seek(0, SEEK_END)) << std::endl; std::cout << "file->Seek(0, SEEK_SET) return value: " << - testing::PrintToString(file->Seek(0, SEEK_SET)) << "\n"; - std::cout << "File contents:\n"; + testing::PrintToString(file->Seek(0, SEEK_SET)) << std::endl; + std::cout << "File contents:" << std::endl; while ((size = file->Read(buf, sizeof(buf))) > 0) { str.Format(" %08X", count); @@ -184,7 +183,7 @@ TEST(TestRarFile, CorruptedFile) else std::cout << "."; } - std::cout << "]\n"; + std::cout << "]" << std::endl; } file->Close(); XBMC_DELETETEMPFILE(file); diff --git a/xbmc/filesystem/test/TestZipFile.cpp b/xbmc/filesystem/test/TestZipFile.cpp index 8f524f7892..65413a9d5a 100644 --- a/xbmc/filesystem/test/TestZipFile.cpp +++ b/xbmc/filesystem/test/TestZipFile.cpp @@ -152,8 +152,7 @@ TEST_F(TestZipFile, CorruptedFile) reffilepath = XBMC_REF_FILE_PATH("xbmc/filesystem/test/reffile.txt.zip"); ASSERT_TRUE((file = XBMC_CREATECORRUPTEDFILE(reffilepath, ".zip")) != NULL); - std::cout << "Reference file generated at '" << XBMC_TEMPFILEPATH(file) << - "'\n"; + std::cout << "Reference file generated at '" << XBMC_TEMPFILEPATH(file) << "'" << std::endl; URIUtils::CreateArchivePath(strzippath, "zip", XBMC_TEMPFILEPATH(file), ""); if (!XFILE::CDirectory::GetDirectory(strzippath, itemlist, "", @@ -178,14 +177,14 @@ TEST_F(TestZipFile, CorruptedFile) return; } std::cout << "file->GetLength(): " << - testing::PrintToString(file->GetLength()) << "\n"; + testing::PrintToString(file->GetLength()) << std::endl; std::cout << "file->Seek(file->GetLength() / 2, SEEK_CUR) return value: " << - testing::PrintToString(file->Seek(file->GetLength() / 2, SEEK_CUR)) << "\n"; + testing::PrintToString(file->Seek(file->GetLength() / 2, SEEK_CUR)) << std::endl; std::cout << "file->Seek(0, SEEK_END) return value: " << - testing::PrintToString(file->Seek(0, SEEK_END)) << "\n"; + testing::PrintToString(file->Seek(0, SEEK_END)) << std::endl; std::cout << "file->Seek(0, SEEK_SET) return value: " << - testing::PrintToString(file->Seek(0, SEEK_SET)) << "\n"; - std::cout << "File contents:\n"; + testing::PrintToString(file->Seek(0, SEEK_SET)) << std::endl; + std::cout << "File contents:" << std::endl; while ((size = file->Read(buf, sizeof(buf))) > 0) { str.Format(" %08X", count); @@ -206,7 +205,7 @@ TEST_F(TestZipFile, CorruptedFile) else std::cout << "."; } - std::cout << "]\n"; + std::cout << "]" << std::endl; } file->Close(); XBMC_DELETETEMPFILE(file); diff --git a/xbmc/utils/test/TestCPUInfo.cpp b/xbmc/utils/test/TestCPUInfo.cpp index dfd1fd27b0..4dbe62d1e2 100644 --- a/xbmc/utils/test/TestCPUInfo.cpp +++ b/xbmc/utils/test/TestCPUInfo.cpp @@ -98,5 +98,5 @@ TEST(TestCPUInfo, getUsedPercentage_output) CCPUInfo c; Sleep(1); /* TODO: Support option from main that sets this parameter */ int r = c.getUsedPercentage(); - std::cout << "Percentage: " << testing::PrintToString(r) << "\n"; + std::cout << "Percentage: " << testing::PrintToString(r) << std::endl; } diff --git a/xbmc/utils/test/TestDownloadQueue.cpp b/xbmc/utils/test/TestDownloadQueue.cpp index 1d0a6183c5..53eb593f96 100644 --- a/xbmc/utils/test/TestDownloadQueue.cpp +++ b/xbmc/utils/test/TestDownloadQueue.cpp @@ -74,7 +74,7 @@ TEST_F(TestDownloadQueue, RequestContent) count = 0; for (it = urls.begin(); it < urls.end(); it++) { - std::cout << "Testing URL: " << *it << "\n"; + std::cout << "Testing URL: " << *it << std::endl; TICKET t = queue.RequestContent(*it, &observer); EXPECT_EQ(count, t.dwItemId); count++; @@ -99,7 +99,7 @@ TEST_F(TestDownloadQueue, RequestFile) count = 0; for (it = urls.begin(); it < urls.end(); it++) { - std::cout << "Testing URL: " << *it << "\n"; + std::cout << "Testing URL: " << *it << std::endl; TICKET t = queue.RequestFile(*it, &observer); EXPECT_EQ(count, t.dwItemId); count++; diff --git a/xbmc/utils/test/TestDownloadQueueManager.cpp b/xbmc/utils/test/TestDownloadQueueManager.cpp index 9ebaec7112..01caba5113 100644 --- a/xbmc/utils/test/TestDownloadQueueManager.cpp +++ b/xbmc/utils/test/TestDownloadQueueManager.cpp @@ -73,9 +73,9 @@ TEST_F(TestDownloadQueueManager, RequestContent) count = 0; for (it = urls.begin(); it < urls.end(); it++) { - std::cout << "Testing URL: " << *it << "\n"; + std::cout << "Testing URL: " << *it << std::endl; TICKET t = g_DownloadManager.RequestContent(*it, &observer); - std::cout << " Ticket Item ID: " << t.dwItemId << "\n"; + std::cout << " Ticket Item ID: " << t.dwItemId << std::endl; count++; } @@ -95,9 +95,9 @@ TEST_F(TestDownloadQueueManager, RequestFile) count = 0; for (it = urls.begin(); it < urls.end(); it++) { - std::cout << "Testing URL: " << *it << "\n"; + std::cout << "Testing URL: " << *it << std::endl; TICKET t = g_DownloadManager.RequestFile(*it, &observer); - std::cout << " Ticket Item ID: " << t.dwItemId << "\n"; + std::cout << " Ticket Item ID: " << t.dwItemId << std::endl; count++; } diff --git a/xbmc/utils/test/TestFileOperationJob.cpp b/xbmc/utils/test/TestFileOperationJob.cpp index 28ec373126..8dc05d7f0b 100644 --- a/xbmc/utils/test/TestFileOperationJob.cpp +++ b/xbmc/utils/test/TestFileOperationJob.cpp @@ -283,10 +283,9 @@ TEST(TestFileOperationJob, GetFunctions) EXPECT_TRUE(XFILE::CFile::Exists(tmpfilepath)); EXPECT_TRUE(XFILE::CFile::Exists(destfile)); - fprintf(stdout, "GetAverageSpeed(): %s\n", job.GetAverageSpeed().c_str()); - fprintf(stdout, "GetCurrentOperation(): %s\n", - job.GetCurrentOperation().c_str()); - fprintf(stdout, "GetCurrentFile(): %s\n", job.GetCurrentFile().c_str()); + std::cout << "GetAverageSpeed(): " << job.GetAverageSpeed() << std::endl; + std::cout << "GetCurrentOperation(): " << job.GetCurrentOperation() << std::endl; + std::cout << "GetCurrentFile(): " << job.GetCurrentFile() << std::endl; EXPECT_FALSE(job.GetItems().IsEmpty()); EXPECT_TRUE(XBMC_DELETETEMPFILE(tmpfile)); diff --git a/xbmc/utils/test/TestPerformanceSample.cpp b/xbmc/utils/test/TestPerformanceSample.cpp index 30264147bf..39cb74004d 100644 --- a/xbmc/utils/test/TestPerformanceSample.cpp +++ b/xbmc/utils/test/TestPerformanceSample.cpp @@ -47,7 +47,7 @@ TEST(TestPerformanceSample, General) EXPECT_GT(a.getFreq(), (int64_t)0); std::cout << "Estimated Error: " << - testing::PrintToString(a.GetEstimatedError()) << "\n"; - std::cout << "Start: " << testing::PrintToString(a.getStart()) << "\n"; - std::cout << "Frequency: " << testing::PrintToString(a.getFreq()) << "\n"; + testing::PrintToString(a.GetEstimatedError()) << std::endl; + std::cout << "Start: " << testing::PrintToString(a.getStart()) << std::endl; + std::cout << "Frequency: " << testing::PrintToString(a.getFreq()) << std::endl; } diff --git a/xbmc/utils/test/TestStopwatch.cpp b/xbmc/utils/test/TestStopwatch.cpp index 510fac5c94..b101133953 100644 --- a/xbmc/utils/test/TestStopwatch.cpp +++ b/xbmc/utils/test/TestStopwatch.cpp @@ -39,12 +39,12 @@ TEST(TestStopWatch, Start) EXPECT_EQ(0.0f, a.GetElapsedSeconds()); EXPECT_EQ(0.0f, a.GetElapsedMilliseconds()); - std::cout << "Calling Start()\n"; + std::cout << "Calling Start()" << std::endl; a.Start(); thread.Sleep(1000); EXPECT_TRUE(a.IsRunning()); - std::cout << "Elapsed Seconds: " << a.GetElapsedSeconds() << "\n"; - std::cout << "Elapsed Milliseconds: " << a.GetElapsedMilliseconds() << "\n"; + std::cout << "Elapsed Seconds: " << a.GetElapsedSeconds() << std::endl; + std::cout << "Elapsed Milliseconds: " << a.GetElapsedMilliseconds() << std::endl; } TEST(TestStopWatch, Stop) @@ -56,12 +56,12 @@ TEST(TestStopWatch, Stop) EXPECT_EQ(0.0f, a.GetElapsedSeconds()); EXPECT_EQ(0.0f, a.GetElapsedMilliseconds()); - std::cout << "Calling Start()\n"; + std::cout << "Calling Start()" << std::endl; a.Start(); thread.Sleep(1000); EXPECT_TRUE(a.IsRunning()); - std::cout << "Elapsed Seconds: " << a.GetElapsedSeconds() << "\n"; - std::cout << "Elapsed Milliseconds: " << a.GetElapsedMilliseconds() << "\n"; + std::cout << "Elapsed Seconds: " << a.GetElapsedSeconds() << std::endl; + std::cout << "Elapsed Milliseconds: " << a.GetElapsedMilliseconds() << std::endl; a.Stop(); EXPECT_FALSE(a.IsRunning()); @@ -78,19 +78,19 @@ TEST(TestStopWatch, StartZero) EXPECT_EQ(0.0f, a.GetElapsedSeconds()); EXPECT_EQ(0.0f, a.GetElapsedMilliseconds()); - std::cout << "Calling StartZero()\n"; + std::cout << "Calling StartZero()" << std::endl; a.StartZero(); thread.Sleep(1000); EXPECT_TRUE(a.IsRunning()); - std::cout << "Elapsed Seconds: " << a.GetElapsedSeconds() << "\n"; - std::cout << "Elapsed Milliseconds: " << a.GetElapsedMilliseconds() << "\n"; + std::cout << "Elapsed Seconds: " << a.GetElapsedSeconds() << std::endl; + std::cout << "Elapsed Milliseconds: " << a.GetElapsedMilliseconds() << std::endl; - std::cout << "Calling StartZero()\n"; + std::cout << "Calling StartZero()" << std::endl; a.StartZero(); thread.Sleep(1000); EXPECT_TRUE(a.IsRunning()); - std::cout << "Elapsed Seconds: " << a.GetElapsedSeconds() << "\n"; - std::cout << "Elapsed Milliseconds: " << a.GetElapsedMilliseconds() << "\n"; + std::cout << "Elapsed Seconds: " << a.GetElapsedSeconds() << std::endl; + std::cout << "Elapsed Milliseconds: " << a.GetElapsedMilliseconds() << std::endl; } TEST(TestStopWatch, Reset) @@ -102,17 +102,17 @@ TEST(TestStopWatch, Reset) EXPECT_EQ(0.0f, a.GetElapsedSeconds()); EXPECT_EQ(0.0f, a.GetElapsedMilliseconds()); - std::cout << "Calling StartZero()\n"; + std::cout << "Calling StartZero()" << std::endl; a.StartZero(); thread.Sleep(1000); EXPECT_TRUE(a.IsRunning()); - std::cout << "Elapsed Seconds: " << a.GetElapsedSeconds() << "\n"; - std::cout << "Elapsed Milliseconds: " << a.GetElapsedMilliseconds() << "\n"; + std::cout << "Elapsed Seconds: " << a.GetElapsedSeconds() << std::endl; + std::cout << "Elapsed Milliseconds: " << a.GetElapsedMilliseconds() << std::endl; - std::cout << "Calling Reset()\n"; + std::cout << "Calling Reset()" << std::endl; a.Reset(); thread.Sleep(1000); EXPECT_TRUE(a.IsRunning()); - std::cout << "Elapsed Seconds: " << a.GetElapsedSeconds() << "\n"; - std::cout << "Elapsed Milliseconds: " << a.GetElapsedMilliseconds() << "\n"; + std::cout << "Elapsed Seconds: " << a.GetElapsedSeconds() << std::endl; + std::cout << "Elapsed Milliseconds: " << a.GetElapsedMilliseconds() << std::endl; } diff --git a/xbmc/utils/test/TestStringUtils.cpp b/xbmc/utils/test/TestStringUtils.cpp index e80d306b53..95e2576dd3 100644 --- a/xbmc/utils/test/TestStringUtils.cpp +++ b/xbmc/utils/test/TestStringUtils.cpp @@ -428,7 +428,7 @@ TEST(TestStringUtils, WordToDigits) TEST(TestStringUtils, CreateUUID) { - std::cout << "CreateUUID(): " << StringUtils::CreateUUID() << "\n"; + std::cout << "CreateUUID(): " << StringUtils::CreateUUID() << std::endl; } TEST(TestStringUtils, ValidateUUID) diff --git a/xbmc/utils/test/TestSystemInfo.cpp b/xbmc/utils/test/TestSystemInfo.cpp index 73bc3f350c..20912936de 100644 --- a/xbmc/utils/test/TestSystemInfo.cpp +++ b/xbmc/utils/test/TestSystemInfo.cpp @@ -51,86 +51,86 @@ protected: #if defined(_LINUX) && !defined(TARGET_DARWIN) && !defined(__FreeBSD__) TEST_F(TestSystemInfo, GetLinuxDistro) { - std::cout << "GetLinuxDistro(): " << g_sysinfo.GetLinuxDistro() << "\n"; + std::cout << "GetLinuxDistro(): " << g_sysinfo.GetLinuxDistro() << std::endl; } #endif #ifdef _LINUX TEST_F(TestSystemInfo, GetUnameVersion) { - std::cout << "GetUnameVersion(): " << g_sysinfo.GetUnameVersion() << "\n"; + std::cout << "GetUnameVersion(): " << g_sysinfo.GetUnameVersion() << std::endl; } #endif TEST_F(TestSystemInfo, GetUserAgent) { - std::cout << "GetUserAgent(): " << g_sysinfo.GetUserAgent() << "\n"; + std::cout << "GetUserAgent(): " << g_sysinfo.GetUserAgent() << std::endl; } TEST_F(TestSystemInfo, HasInternet) { std::cout << "HasInternet(): " << - testing::PrintToString(g_sysinfo.HasInternet()) << "\n"; + testing::PrintToString(g_sysinfo.HasInternet()) << std::endl; } TEST_F(TestSystemInfo, IsAppleTV2) { std::cout << "IsAppleTV2(): " << - testing::PrintToString(g_sysinfo.IsAppleTV2()) << "\n"; + testing::PrintToString(g_sysinfo.IsAppleTV2()) << std::endl; } TEST_F(TestSystemInfo, HasVDADecoder) { std::cout << "HasVDADecoder(): " << - testing::PrintToString(g_sysinfo.HasVDADecoder()) << "\n"; + testing::PrintToString(g_sysinfo.HasVDADecoder()) << std::endl; } TEST_F(TestSystemInfo, HasVideoToolBoxDecoder) { std::cout << "HasVideoToolBoxDecoder(): " << - testing::PrintToString(g_sysinfo.HasVideoToolBoxDecoder()) << "\n"; + testing::PrintToString(g_sysinfo.HasVideoToolBoxDecoder()) << std::endl; } TEST_F(TestSystemInfo, IsAeroDisabled) { std::cout << "IsAeroDisabled(): " << - testing::PrintToString(g_sysinfo.IsAeroDisabled()) << "\n"; + testing::PrintToString(g_sysinfo.IsAeroDisabled()) << std::endl; } TEST_F(TestSystemInfo, IsVistaOrHigher) { std::cout << "IsVistaOrHigher(): " << - testing::PrintToString(g_sysinfo.IsVistaOrHigher()) << "\n"; + testing::PrintToString(g_sysinfo.IsVistaOrHigher()) << std::endl; } TEST_F(TestSystemInfo, GetKernelVersion) { - std::cout << "GetKernelVersion(): " << CSysInfo::GetKernelVersion() << "\n"; + std::cout << "GetKernelVersion(): " << CSysInfo::GetKernelVersion() << std::endl; } TEST_F(TestSystemInfo, GetCPUModel) { - std::cout << "GetCPUModel(): " << g_sysinfo.GetCPUModel() << "\n"; + std::cout << "GetCPUModel(): " << g_sysinfo.GetCPUModel() << std::endl; } TEST_F(TestSystemInfo, GetCPUBogoMips) { - std::cout << "GetCPUBogoMips(): " << g_sysinfo.GetCPUBogoMips() << "\n"; + std::cout << "GetCPUBogoMips(): " << g_sysinfo.GetCPUBogoMips() << std::endl; } TEST_F(TestSystemInfo, GetCPUHardware) { - std::cout << "GetCPUHardware(): " << g_sysinfo.GetCPUHardware() << "\n"; + std::cout << "GetCPUHardware(): " << g_sysinfo.GetCPUHardware() << std::endl; } TEST_F(TestSystemInfo, GetCPURevision) { - std::cout << "GetCPURevision(): " << g_sysinfo.GetCPURevision() << "\n"; + std::cout << "GetCPURevision(): " << g_sysinfo.GetCPURevision() << std::endl; } TEST_F(TestSystemInfo, GetCPUSerial) { - std::cout << "GetCPUSerial(): " << g_sysinfo.GetCPUSerial() << "\n"; + std::cout << "GetCPUSerial(): " << g_sysinfo.GetCPUSerial() << std::endl; } TEST_F(TestSystemInfo, GetDiskSpace) @@ -142,12 +142,12 @@ TEST_F(TestSystemInfo, GetDiskSpace) std::cout << "GetDiskSpace(): " << testing::PrintToString(g_sysinfo.GetDiskSpace("*", iTotal, iTotalFree, iTotalUsed, iPercentFree, - iPercentUsed)) << "\n"; - std::cout << "iTotal: " << testing::PrintToString(iTotal) << "\n"; - std::cout << "iTotalFree: " << testing::PrintToString(iTotalFree) << "\n"; - std::cout << "iTotalUsed: " << testing::PrintToString(iTotalUsed) << "\n"; - std::cout << "iPercentFree: " << testing::PrintToString(iPercentFree) << "\n"; - std::cout << "iPercentUsed: " << testing::PrintToString(iPercentUsed) << "\n"; + iPercentUsed)) << std::endl; + std::cout << "iTotal: " << testing::PrintToString(iTotal) << std::endl; + std::cout << "iTotalFree: " << testing::PrintToString(iTotalFree) << std::endl; + std::cout << "iTotalUsed: " << testing::PrintToString(iTotalUsed) << std::endl; + std::cout << "iPercentFree: " << testing::PrintToString(iPercentFree) << std::endl; + std::cout << "iPercentUsed: " << testing::PrintToString(iPercentUsed) << std::endl; } TEST_F(TestSystemInfo, GetHddSpaceInfo) @@ -155,22 +155,22 @@ TEST_F(TestSystemInfo, GetHddSpaceInfo) int percent; std::cout << "GetHddSpaceInfo(SYSTEM_FREE_SPACE): " << - g_sysinfo.GetHddSpaceInfo(SYSTEM_FREE_SPACE) << "\n"; + g_sysinfo.GetHddSpaceInfo(SYSTEM_FREE_SPACE) << std::endl; std::cout << "GetHddSpaceInfo(SYSTEM_USED_SPACE): " << - g_sysinfo.GetHddSpaceInfo(SYSTEM_USED_SPACE) << "\n"; + g_sysinfo.GetHddSpaceInfo(SYSTEM_USED_SPACE) << std::endl; std::cout << "GetHddSpaceInfo(SYSTEM_TOTAL_SPACE): " << - g_sysinfo.GetHddSpaceInfo(SYSTEM_TOTAL_SPACE) << "\n"; + g_sysinfo.GetHddSpaceInfo(SYSTEM_TOTAL_SPACE) << std::endl; std::cout << "GetHddSpaceInfo(SYSTEM_FREE_SPACE_PERCENT): " << - g_sysinfo.GetHddSpaceInfo(SYSTEM_FREE_SPACE_PERCENT) << "\n"; + g_sysinfo.GetHddSpaceInfo(SYSTEM_FREE_SPACE_PERCENT) << std::endl; std::cout << "GetHddSpaceInfo(SYSTEM_USED_SPACE_PERCENT): " << - g_sysinfo.GetHddSpaceInfo(SYSTEM_USED_SPACE_PERCENT) << "\n"; + g_sysinfo.GetHddSpaceInfo(SYSTEM_USED_SPACE_PERCENT) << std::endl; percent = 0; std::cout << "GetHddSpaceInfo(percent, SYSTEM_FREE_SPACE, true): " << - g_sysinfo.GetHddSpaceInfo(percent, SYSTEM_FREE_SPACE, true) << "\n"; - std::cout << "percent: " << testing::PrintToString(percent) << "\n"; + g_sysinfo.GetHddSpaceInfo(percent, SYSTEM_FREE_SPACE, true) << std::endl; + std::cout << "percent: " << testing::PrintToString(percent) << std::endl; percent = 0; std::cout << "GetHddSpaceInfo(percent, SYSTEM_USED_SPACE, true): " << - g_sysinfo.GetHddSpaceInfo(percent, SYSTEM_USED_SPACE, true) << "\n"; - std::cout << "percent: " << testing::PrintToString(percent) << "\n"; + g_sysinfo.GetHddSpaceInfo(percent, SYSTEM_USED_SPACE, true) << std::endl; + std::cout << "percent: " << testing::PrintToString(percent) << std::endl; } diff --git a/xbmc/utils/test/TestTimeUtils.cpp b/xbmc/utils/test/TestTimeUtils.cpp index 46d77da50b..1360b87280 100644 --- a/xbmc/utils/test/TestTimeUtils.cpp +++ b/xbmc/utils/test/TestTimeUtils.cpp @@ -26,24 +26,24 @@ TEST(TestTimeUtils, CurrentHostCounter) { std::cout << "CurrentHostCounter(): " << - testing::PrintToString(CurrentHostCounter()) << "\n"; + testing::PrintToString(CurrentHostCounter()) << std::endl; } TEST(TestTimeUtils, CurrentHostFrequency) { std::cout << "CurrentHostFrequency(): " << - testing::PrintToString(CurrentHostFrequency()) << "\n"; + testing::PrintToString(CurrentHostFrequency()) << std::endl; } TEST(TestTimeUtils, GetFrameTime) { std::cout << "GetFrameTime(): " << - testing::PrintToString(CTimeUtils::GetFrameTime()) << "\n"; + testing::PrintToString(CTimeUtils::GetFrameTime()) << std::endl; - std::cout << "Calling UpdateFrameTime()\n"; + std::cout << "Calling UpdateFrameTime()" << std::endl; CTimeUtils::UpdateFrameTime(true); std::cout << "GetFrameTime(): " << - testing::PrintToString(CTimeUtils::GetFrameTime()) << "\n"; + testing::PrintToString(CTimeUtils::GetFrameTime()) << std::endl; } TEST(TestTimeUtils, GetLocalTime) @@ -53,9 +53,9 @@ TEST(TestTimeUtils, GetLocalTime) cdatetime = CTimeUtils::GetLocalTime(time); std::cout << "cdatetime.GetAsLocalizedDateTime(): " << - cdatetime.GetAsLocalizedDateTime() << "\n"; + cdatetime.GetAsLocalizedDateTime() << std::endl; cdatetime2 = time; std::cout << "time: " << - cdatetime2.GetAsLocalizedDateTime() << "\n"; + cdatetime2.GetAsLocalizedDateTime() << std::endl; } diff --git a/xbmc/utils/test/TestURIUtils.cpp b/xbmc/utils/test/TestURIUtils.cpp index 404b569450..7634b48c21 100644 --- a/xbmc/utils/test/TestURIUtils.cpp +++ b/xbmc/utils/test/TestURIUtils.cpp @@ -209,7 +209,7 @@ TEST_F(TestURIUtils, IsDOSPath) TEST_F(TestURIUtils, IsDVD) { EXPECT_TRUE(URIUtils::IsDVD("dvd://path/in/video_ts.ifo")); -#if defined(_WIN32) +#if defined(TARGET_WINDOWS) EXPECT_TRUE(URIUtils::IsDVD("dvd://path/in/file")); #else EXPECT_TRUE(URIUtils::IsDVD("iso9660://path/in/video_ts.ifo")); |