summaryrefslogtreecommitdiff
path: root/docs/html/presentation_tests_8cpp.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/html/presentation_tests_8cpp.html')
-rw-r--r--docs/html/presentation_tests_8cpp.html371
1 files changed, 371 insertions, 0 deletions
diff --git a/docs/html/presentation_tests_8cpp.html b/docs/html/presentation_tests_8cpp.html
new file mode 100644
index 0000000..90e46db
--- /dev/null
+++ b/docs/html/presentation_tests_8cpp.html
@@ -0,0 +1,371 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Rally X: tests/presentationTests.cpp File Reference</title>
+
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+ $(document).ready(function() { searchBox.OnSelectItem(0); });
+</script>
+
+</head>
+<body>
+<div id="top"><!-- do not remove this div! -->
+
+
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+
+ <td id="projectlogo"><img alt="Logo" src="car.PNG"/></td>
+
+
+ <td style="padding-left: 0.5em;">
+ <div id="projectname">Rally X
+
+ </div>
+ <div id="projectbrief">ELEN3009 Project by Justin Wernick and David Schneider</div>
+ </td>
+
+
+
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<!-- Generated by Doxygen 1.7.5.1 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Classes</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ <li>
+ <div id="MSearchBox" class="MSearchBoxInactive">
+ <span class="left">
+ <img id="MSearchSelect" src="search/mag_sel.png"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ alt=""/>
+ <input type="text" id="MSearchField" value="Search" accesskey="S"
+ onfocus="searchBox.OnSearchFieldFocus(true)"
+ onblur="searchBox.OnSearchFieldFocus(false)"
+ onkeyup="searchBox.OnSearchFieldChange(event)"/>
+ </span><span class="right">
+ <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+ </span>
+ </div>
+ </li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li><a href="globals.html"><span>File&#160;Members</span></a></li>
+ </ul>
+ </div>
+</div>
+<div class="header">
+ <div class="summary">
+<a href="#func-members">Functions</a> </div>
+ <div class="headertitle">
+<div class="title">tests/presentationTests.cpp File Reference</div> </div>
+</div>
+<div class="contents">
+
+<p>Unit tests for the presentation layer of a Rally-X game.
+<a href="#details">More...</a></p>
+<div class="textblock"><code>#include &lt;utility&gt;</code><br/>
+<code>#include &lt;list&gt;</code><br/>
+<code>#include &lt;gtest/gtest.h&gt;</code><br/>
+<code>#include &quot;../source/presentation/BitmapStore.h&quot;</code><br/>
+<code>#include &quot;../source/presentation/ColourStore.h&quot;</code><br/>
+<code>#include &quot;../source/presentation/GamePanel.h&quot;</code><br/>
+<code>#include &quot;../source/presentation/Screen.h&quot;</code><br/>
+<code>#include &quot;../source/logic/PlayerCar.h&quot;</code><br/>
+<code>#include &quot;../source/logic/EnemyCar.h&quot;</code><br/>
+<code>#include &quot;../source/logic/Checkpoint.h&quot;</code><br/>
+<code>#include &quot;../source/logic/Rock.h&quot;</code><br/>
+<code>#include &quot;../source/logic/Smokescreen.h&quot;</code><br/>
+<code>#include &quot;../source/logic/Maze.h&quot;</code><br/>
+<code>#include &quot;../source/logic/DestroyedObjectPopup.h&quot;</code><br/>
+</div>
+<p><a href="presentation_tests_8cpp_source.html">Go to the source code of this file.</a></p>
+<table class="memberdecls">
+<tr><td colspan="2"><h2><a name="func-members"></a>
+Functions</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="presentation_tests_8cpp.html#a1f28e78cfee8247b7031e29d1db8b088">TEST</a> (<a class="el" href="class_bitmap_store.html">BitmapStore</a>, returnsBitmapForAllImages)</td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Tests that all images can be requested without failure occuring. <a href="#a1f28e78cfee8247b7031e29d1db8b088"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="presentation_tests_8cpp.html#a93e9b8f162d329b2498f62812b5651f9">TEST</a> (<a class="el" href="class_colour_store.html">ColourStore</a>, returnsColourForAllImages)</td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Tests that all colours can be requested without failure occuring. <a href="#a93e9b8f162d329b2498f62812b5651f9"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="presentation_tests_8cpp.html#a09481990af46ae9fd4cced79cce78953">TEST</a> (<a class="el" href="class_screen.html">Screen</a>, exceptionOnBadResolution)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="presentation_tests_8cpp.html#a52ee17980b74b96293db8c102b8245c0">TEST</a> (<a class="el" href="class_screen.html">Screen</a>, noExceptionOnWindowed)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="presentation_tests_8cpp.html#a2f96180c4b643bba6a3e9c97a9467f8f">TEST</a> (<a class="el" href="class_screen.html">Screen</a>, noExceptionOnGoodResolution)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="presentation_tests_8cpp.html#ac0685cd3085971f9d09b22ed8563d766">TEST</a> (<a class="el" href="class_screen_panel.html">ScreenPanel</a>, drawingToCurrentBackBuffer)</td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Tests that when a <a class="el" href="class_screen_panel.html" title="Parent class for panels that are drawn on the screen.">ScreenPanel</a> draws to the back buffer provided. <a href="#ac0685cd3085971f9d09b22ed8563d766"></a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="presentation_tests_8cpp.html#a8b8a615a5a6ef5da97b81d626fba41eb">TEST</a> (<a class="el" href="class_screen_panel.html">ScreenPanel</a>, drawingToCurrentBackBufferAfterFlip)</td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Tests that when a <a class="el" href="class_screen_panel.html" title="Parent class for panels that are drawn on the screen.">ScreenPanel</a> draws to the front buffer provided after a flip has been called. <a href="#a8b8a615a5a6ef5da97b81d626fba41eb"></a><br/></td></tr>
+</table>
+<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
+<div class="textblock"><p>Unit tests for the presentation layer of a Rally-X game. </p>
+<p>The <a class="el" href="class_bitmap_store.html" title="Class for accessing images in ALLEGRO_BITMAP format and low level drawing.">BitmapStore</a> class is tested in its ability to return a bitmap for each image. The appearance of the bitmaps need to be tested manually by running the game and inspecting the various objects.</p>
+<p>The <a class="el" href="class_colour_store.html" title="Class for mapping BitmapStore images to colours for use in the minimap.">ColourStore</a> class is tested in its ability to return a colour for each image. The appearance of the colours need to be tested manually by running the game and inspecting the various objects.</p>
+<p>The <a class="el" href="class_game_panel.html" title="ScreenPanel to be drawn on the screen to draw the area where the game takes place.">GamePanel</a> and <a class="el" href="class_info_panel.html" title="ScreenPanel to be drawn on the screen to give the player information.">InfoPanel</a> classes depend on their visual appearance in the game. Therefore, they should be tested manually. The technical part of their functionality, creating the back and front buffers and changing between them, is handled by their superclass, <a class="el" href="class_screen_panel.html" title="Parent class for panels that are drawn on the screen.">ScreenPanel</a>.</p>
+<p>The <a class="el" href="class_keyboard_handler.html" title="Class for handling keyboard related game inputs from the player.">KeyboardHandler</a> depends on user inputs. It should be tested manually by testing that the player's direction can be controlled, and that smokescreens can be created.</p>
+<p>The <a class="el" href="class_screen.html" title="Class for creating a window on the screen.">Screen</a> class's creation with various resolutions and fullscreen settings is tested. An exception should be thrown if the fullscreen resolution is not supported by the current hardware, but not otherwise. The visual appearance and creation of ScreenPanels should be tested manually by running the game.</p>
+<p>The <a class="el" href="class_screen_panel.html" title="Parent class for panels that are drawn on the screen.">ScreenPanel</a> class is tested by creating a false back and front display buffer. The buffer that is being drawn to is tested by sampling a pixel in the middle of the buffer.</p>
+<dl class="author"><dt><b>Author:</b></dt><dd>Justin Wernick </dd>
+<dd>
+David Schneider </dd></dl>
+
+<p>Definition in file <a class="el" href="presentation_tests_8cpp_source.html">presentationTests.cpp</a>.</p>
+</div><hr/><h2>Function Documentation</h2>
+<a class="anchor" id="a1f28e78cfee8247b7031e29d1db8b088"></a><!-- doxytag: member="presentationTests.cpp::TEST" ref="a1f28e78cfee8247b7031e29d1db8b088" args="(BitmapStore, returnsBitmapForAllImages)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">TEST </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="class_bitmap_store.html">BitmapStore</a>&#160;</td>
+ <td class="paramname">, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">returnsBitmapForAllImages&#160;</td>
+ <td class="paramname">&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Tests that all images can be requested without failure occuring. </p>
+
+<p>Definition at line <a class="el" href="presentation_tests_8cpp_source.html#l00055">55</a> of file <a class="el" href="presentation_tests_8cpp_source.html">presentationTests.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a93e9b8f162d329b2498f62812b5651f9"></a><!-- doxytag: member="presentationTests.cpp::TEST" ref="a93e9b8f162d329b2498f62812b5651f9" args="(ColourStore, returnsColourForAllImages)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">TEST </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="class_colour_store.html">ColourStore</a>&#160;</td>
+ <td class="paramname">, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">returnsColourForAllImages&#160;</td>
+ <td class="paramname">&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Tests that all colours can be requested without failure occuring. </p>
+
+<p>Definition at line <a class="el" href="presentation_tests_8cpp_source.html#l00075">75</a> of file <a class="el" href="presentation_tests_8cpp_source.html">presentationTests.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a09481990af46ae9fd4cced79cce78953"></a><!-- doxytag: member="presentationTests.cpp::TEST" ref="a09481990af46ae9fd4cced79cce78953" args="(Screen, exceptionOnBadResolution)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">TEST </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="class_screen.html">Screen</a>&#160;</td>
+ <td class="paramname">, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">exceptionOnBadResolution&#160;</td>
+ <td class="paramname">&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Tests that an exception is thrown if fullscreen mode is requested on an unsupported monitor resolution. </p>
+
+<p>Definition at line <a class="el" href="presentation_tests_8cpp_source.html#l00095">95</a> of file <a class="el" href="presentation_tests_8cpp_source.html">presentationTests.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a52ee17980b74b96293db8c102b8245c0"></a><!-- doxytag: member="presentationTests.cpp::TEST" ref="a52ee17980b74b96293db8c102b8245c0" args="(Screen, noExceptionOnWindowed)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">TEST </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="class_screen.html">Screen</a>&#160;</td>
+ <td class="paramname">, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">noExceptionOnWindowed&#160;</td>
+ <td class="paramname">&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Tests that an exception is not thrown if windowed mode is requested on an unsupported monitor resolution. </p>
+
+<p>Definition at line <a class="el" href="presentation_tests_8cpp_source.html#l00106">106</a> of file <a class="el" href="presentation_tests_8cpp_source.html">presentationTests.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a2f96180c4b643bba6a3e9c97a9467f8f"></a><!-- doxytag: member="presentationTests.cpp::TEST" ref="a2f96180c4b643bba6a3e9c97a9467f8f" args="(Screen, noExceptionOnGoodResolution)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">TEST </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="class_screen.html">Screen</a>&#160;</td>
+ <td class="paramname">, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">noExceptionOnGoodResolution&#160;</td>
+ <td class="paramname">&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+<p>Tests that an exception is not thrown if fullscreen mode is requested on a supported monitor resolution. </p>
+
+<p>Definition at line <a class="el" href="presentation_tests_8cpp_source.html#l00117">117</a> of file <a class="el" href="presentation_tests_8cpp_source.html">presentationTests.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="ac0685cd3085971f9d09b22ed8563d766"></a><!-- doxytag: member="presentationTests.cpp::TEST" ref="ac0685cd3085971f9d09b22ed8563d766" args="(ScreenPanel, drawingToCurrentBackBuffer)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">TEST </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="class_screen_panel.html">ScreenPanel</a>&#160;</td>
+ <td class="paramname">, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">drawingToCurrentBackBuffer&#160;</td>
+ <td class="paramname">&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Tests that when a <a class="el" href="class_screen_panel.html" title="Parent class for panels that are drawn on the screen.">ScreenPanel</a> draws to the back buffer provided. </p>
+
+<p>Definition at line <a class="el" href="presentation_tests_8cpp_source.html#l00129">129</a> of file <a class="el" href="presentation_tests_8cpp_source.html">presentationTests.cpp</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a8b8a615a5a6ef5da97b81d626fba41eb"></a><!-- doxytag: member="presentationTests.cpp::TEST" ref="a8b8a615a5a6ef5da97b81d626fba41eb" args="(ScreenPanel, drawingToCurrentBackBufferAfterFlip)" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">TEST </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="class_screen_panel.html">ScreenPanel</a>&#160;</td>
+ <td class="paramname">, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">drawingToCurrentBackBufferAfterFlip&#160;</td>
+ <td class="paramname">&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>Tests that when a <a class="el" href="class_screen_panel.html" title="Parent class for panels that are drawn on the screen.">ScreenPanel</a> draws to the front buffer provided after a flip has been called. </p>
+
+<p>Definition at line <a class="el" href="presentation_tests_8cpp_source.html#l00189">189</a> of file <a class="el" href="presentation_tests_8cpp_source.html">presentationTests.cpp</a>.</p>
+
+</div>
+</div>
+</div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+
+
+<hr class="footer"/><address class="footer"><small>
+Generated on Wed Oct 5 2011 20:08:31 for Rally X by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.7.5.1
+</small></address>
+
+</body>
+</html>