Skip to content

Commit

Permalink
Tests: Updated code style convention
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Nov 24, 2012
1 parent 273bada commit 6f5d6f1
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
14 changes: 7 additions & 7 deletions doomsday/tests/archive/main.cpp
Expand Up @@ -30,7 +30,7 @@

using namespace de;

int main(int argc, char** argv)
int main(int argc, char **argv)
{
try
{
Expand All @@ -43,12 +43,12 @@ int main(int argc, char** argv)
Reader(b, littleEndianByteOrder) >> v;
LOG_MSG("%x") << v;

Folder& zip = app.fileSystem().find<Folder>("test.zip");
Folder &zip = app.fileSystem().find<Folder>("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<File>("hello.txt");
File const &hello = zip.locate<File>("hello.txt");
File::Status stats = hello.status();
LOG_MSG("hello.txt size: %i bytes, modified at %s") << stats.size << Date(stats.modifiedAt);

Expand All @@ -58,26 +58,26 @@ 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.");
}

// 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());
Writer(zip2) << arch;
LOG_MSG("Wrote ") << zip2.path();
LOG_MSG("") << zip2.info();
}
catch(const Error& err)
catch(Error const &err)
{
qWarning() << err.asText();
}
Expand Down
4 changes: 2 additions & 2 deletions doomsday/tests/log/main.cpp
Expand Up @@ -24,7 +24,7 @@

using namespace de;

int main(int argc, char** argv)
int main(int argc, char **argv)
{
try
{
Expand All @@ -47,7 +47,7 @@ int main(int argc, char** argv)
}
}
}
catch(const Error& err)
catch(Error const &err)
{
qWarning() << err.asText();
}
Expand Down
4 changes: 2 additions & 2 deletions doomsday/tests/record/main.cpp
Expand Up @@ -30,7 +30,7 @@

using namespace de;

int main(int argc, char** argv)
int main(int argc, char **argv)
{
try
{
Expand Down Expand Up @@ -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();
}
Expand Down
4 changes: 2 additions & 2 deletions doomsday/tests/script/main.cpp
Expand Up @@ -26,7 +26,7 @@

using namespace de;

int main(int argc, char** argv)
int main(int argc, char **argv)
{
try
{
Expand All @@ -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();
}
Expand Down
8 changes: 4 additions & 4 deletions doomsday/tests/stringpool/main.cpp
Expand Up @@ -28,7 +28,7 @@

using namespace de;

int main(int, char**)
int main(int, char **)
{
try
{
Expand All @@ -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);
Expand Down Expand Up @@ -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";
}
Expand Down
4 changes: 2 additions & 2 deletions doomsday/tests/vectors/main.cpp
Expand Up @@ -22,7 +22,7 @@

using namespace de;

int main(int, char**)
int main(int, char **)
{
try
{
Expand Down Expand Up @@ -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";
}
Expand Down

0 comments on commit 6f5d6f1

Please sign in to comment.