Skip to content

Instantly share code, notes, and snippets.

@Groogy
Created February 3, 2013 19:16
Show Gist options
  • Save Groogy/4703233 to your computer and use it in GitHub Desktop.
Save Groogy/4703233 to your computer and use it in GitHub Desktop.
/* Tyr
* Copyright (c) 2013 Henrik Valter Vogelius Hansson
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#include <Tyr/Configuration.hpp>
#include <igloo/igloo.h>
using namespace igloo;
Context(DefaultConfiguration)
{
void SetUp()
{
configuration = tyr::Configuration::getDefaultConfiguration();
}
Spec(ShouldAlwaysHaveValidValues)
{
tyr::Configuration windowConfig = configuration[std::string("Window")];
AssertThat(static_cast<unsigned int>(windowConfig[std::string("dimension")][0]), Is().EqualTo(1024));
AssertThat(static_cast<unsigned int>(windowConfig[std::string("dimension")][1]), Is().EqualTo(769));
/*AssertThat(static_cast<bool>(windowConfig["fullscreen"]), Is().False());
AssertThat(static_cast<bool>(windowConfig["vsync"]), Is().False());
AssertThat(static_cast<std::string>(windowConfig["title"]), Is().EqualTo("Tyr"));*/
}
tyr::Configuration configuration;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment