From 98ba22e7064db57316dfff1ae127feb3dceeb73e Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Thu, 31 Jul 2014 13:58:22 +0200 Subject: Initial commit --- docs/html/data_tests_8cpp.html | 305 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 305 insertions(+) create mode 100644 docs/html/data_tests_8cpp.html (limited to 'docs/html/data_tests_8cpp.html') diff --git a/docs/html/data_tests_8cpp.html b/docs/html/data_tests_8cpp.html new file mode 100644 index 0000000..2aba791 --- /dev/null +++ b/docs/html/data_tests_8cpp.html @@ -0,0 +1,305 @@ + + + + +Rally X: tests/dataTests.cpp File Reference + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + +
+
Rally X + +
+
ELEN3009 Project by Justin Wernick and David Schneider
+
+
+ + + + + +
+
+ +
+
tests/dataTests.cpp File Reference
+
+
+ +

Unit tests for the data layer of a Rally-X game. +More...

+
#include <cstdio>
+#include <fstream>
+#include <gtest/gtest.h>
+#include "../source/data/Config.h"
+#include "../source/data/LevelReader.h"
+#include "../source/logic/PlayerCar.h"
+#include "../source/logic/EnemyCar.h"
+#include "../source/logic/Checkpoint.h"
+#include "../source/logic/Rock.h"
+#include "../source/logic/Smokescreen.h"
+#include "../source/logic/Maze.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + + + +

+Functions

 TEST (Config, readsSettingsCorrectly)
 Tests that a normal complete config file can be read.
 TEST (Config, createsFileIfNeeded)
 Tests that, if the config file does not exist, it is created with default values.
 TEST (Config, incompleteFileFilled)
 Tests that an incomplete config file is loaded, with defaults for the missing values.
 TEST (LevelReader, readsFileInfoObjects)
 Tests that a level can be loaded correctly from a file.
 TEST (LevelReader, throwsExceptionOnBadFilename)
 Tests that an exception is throws if the selected file does not exist.
+

Detailed Description

+

Unit tests for the data layer of a Rally-X game.

+

The functionality of each class in the data layer was tested.

+

The Config class was tested in terms of its ability to read an existing config file, as well as its ability to create a new file with default values, or fill missing parameters with default values.

+

The LevelReader class was tested in the normal case, where a correct level file is given, and in the case where a file that does not exist is given.

+
Author:
Justin Wernick
+
+David Schneider
+ +

Definition in file dataTests.cpp.

+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
TEST (Config ,
readsSettingsCorrectly  
)
+
+
+ +

Tests that a normal complete config file can be read.

+ +

Definition at line 35 of file dataTests.cpp.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
TEST (Config ,
createsFileIfNeeded  
)
+
+
+ +

Tests that, if the config file does not exist, it is created with default values.

+ +

Definition at line 58 of file dataTests.cpp.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
TEST (Config ,
incompleteFileFilled  
)
+
+
+ +

Tests that an incomplete config file is loaded, with defaults for the missing values.

+ +

Definition at line 78 of file dataTests.cpp.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
TEST (LevelReader ,
readsFileInfoObjects  
)
+
+
+ +

Tests that a level can be loaded correctly from a file.

+ +

Definition at line 99 of file dataTests.cpp.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
TEST (LevelReader ,
throwsExceptionOnBadFilename  
)
+
+
+ +

Tests that an exception is throws if the selected file does not exist.

+ +

Definition at line 174 of file dataTests.cpp.

+ +
+
+
+ +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator
+ + +
+ +
+ + + + + + + -- cgit v1.2.3