From 6f5d6f1c7bb599523a36191ba0a12fb05b5c0b21 Mon Sep 17 00:00:00 2001 From: skyjake Date: Sat, 24 Nov 2012 22:48:11 +0200 Subject: [PATCH] Tests: Updated code style convention --- doomsday/tests/archive/main.cpp | 14 +++++++------- doomsday/tests/log/main.cpp | 4 ++-- doomsday/tests/record/main.cpp | 4 ++-- doomsday/tests/script/main.cpp | 4 ++-- doomsday/tests/stringpool/main.cpp | 8 ++++---- doomsday/tests/vectors/main.cpp | 4 ++-- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/doomsday/tests/archive/main.cpp b/doomsday/tests/archive/main.cpp index 42df76212a..9aa35ea345 100644 --- a/doomsday/tests/archive/main.cpp +++ b/doomsday/tests/archive/main.cpp @@ -30,7 +30,7 @@ using namespace de; -int main(int argc, char** argv) +int main(int argc, char **argv) { try { @@ -43,12 +43,12 @@ int main(int argc, char** argv) Reader(b, littleEndianByteOrder) >> v; LOG_MSG("%x") << v; - Folder& zip = app.fileSystem().find("test.zip"); + Folder &zip = app.fileSystem().find("test.zip"); LOG_MSG("Here's test.zip's info:\n") << zip.info(); LOG_MSG("Root folder's info:\n") << app.rootFolder().info(); - const File& hello = zip.locate("hello.txt"); + File const &hello = zip.locate("hello.txt"); File::Status stats = hello.status(); LOG_MSG("hello.txt size: %i bytes, modified at %s") << stats.size << Date(stats.modifiedAt); @@ -58,10 +58,10 @@ int main(int argc, char** argv) try { // Make a second entry. - File& worldTxt = zip.newFile("world.txt"); + File &worldTxt = zip.newFile("world.txt"); Writer(worldTxt) << FixedByteArray(content.toUtf8()); } - catch(const File::OutputError&) + catch(File::OutputError const &) { LOG_WARNING("Cannot change files in read-only mode."); } @@ -69,7 +69,7 @@ int main(int argc, char** argv) // test2.zip won't appear in the file system as a folder unless // FS::refresh() is called. newFile() doesn't interpret anything, just // makes a plain file. - File& zip2 = app.homeFolder().replaceFile("test2.zip"); + File &zip2 = app.homeFolder().replaceFile("test2.zip"); zip2.setMode(File::Write | File::Truncate); ZipArchive arch; arch.add("world.txt", content.toUtf8()); @@ -77,7 +77,7 @@ int main(int argc, char** argv) LOG_MSG("Wrote ") << zip2.path(); LOG_MSG("") << zip2.info(); } - catch(const Error& err) + catch(Error const &err) { qWarning() << err.asText(); } diff --git a/doomsday/tests/log/main.cpp b/doomsday/tests/log/main.cpp index 920bb7bd8a..814d7e6d5b 100644 --- a/doomsday/tests/log/main.cpp +++ b/doomsday/tests/log/main.cpp @@ -24,7 +24,7 @@ using namespace de; -int main(int argc, char** argv) +int main(int argc, char **argv) { try { @@ -47,7 +47,7 @@ int main(int argc, char** argv) } } } - catch(const Error& err) + catch(Error const &err) { qWarning() << err.asText(); } diff --git a/doomsday/tests/record/main.cpp b/doomsday/tests/record/main.cpp index e4dd59db42..fc50de48ab 100644 --- a/doomsday/tests/record/main.cpp +++ b/doomsday/tests/record/main.cpp @@ -30,7 +30,7 @@ using namespace de; -int main(int argc, char** argv) +int main(int argc, char **argv) { try { @@ -63,7 +63,7 @@ int main(int argc, char** argv) Reader(b) >> rec2; LOG_MSG("After being deserialized:\n") << rec2; } - catch(const Error& err) + catch(Error const &err) { qWarning() << err.asText(); } diff --git a/doomsday/tests/script/main.cpp b/doomsday/tests/script/main.cpp index 32fad9b2e5..7e3e936c15 100644 --- a/doomsday/tests/script/main.cpp +++ b/doomsday/tests/script/main.cpp @@ -26,7 +26,7 @@ using namespace de; -int main(int argc, char** argv) +int main(int argc, char **argv) { try { @@ -43,7 +43,7 @@ int main(int argc, char** argv) LOG_MSG("------------------------------------------------------------------------------"); LOG_MSG("Final result value is: ") << proc.context().evaluator().result().asText(); } - catch(const Error& err) + catch(Error const &err) { qWarning() << err.asText(); } diff --git a/doomsday/tests/stringpool/main.cpp b/doomsday/tests/stringpool/main.cpp index a96c625af3..66bd926a36 100644 --- a/doomsday/tests/stringpool/main.cpp +++ b/doomsday/tests/stringpool/main.cpp @@ -28,7 +28,7 @@ using namespace de; -int main(int, char**) +int main(int, char **) { try { @@ -51,11 +51,11 @@ int main(int, char**) // Another string. s = String("abc"); - String const& is = p.internAndRetrieve(s); + String const &is = p.internAndRetrieve(s); DENG2_ASSERT(!is.compare(s)); String s2 = String("ABC"); - String const& is2 = p.internAndRetrieve(s2); + String const &is2 = p.internAndRetrieve(s2); DENG2_ASSERT(!is2.compare(s)); DENG2_ASSERT(p.intern(is2) == 2); @@ -102,7 +102,7 @@ int main(int, char**) p.clear(); DENG2_ASSERT(p.empty()); } - catch(const Error& err) + catch(Error const &err) { qWarning() << err.asText() << "\n"; } diff --git a/doomsday/tests/vectors/main.cpp b/doomsday/tests/vectors/main.cpp index da11b186a3..b2245bc19c 100644 --- a/doomsday/tests/vectors/main.cpp +++ b/doomsday/tests/vectors/main.cpp @@ -22,7 +22,7 @@ using namespace de; -int main(int, char**) +int main(int, char **) { try { @@ -75,7 +75,7 @@ int main(int, char**) qDebug() << "s < t: " << (s < t) << " <- first operand causes conversion to Vector2"; qDebug() << "t < s: " << (t < s); } - catch(const Error& err) + catch(Error const &err) { qWarning() << err.asText() << "\n"; }