Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/tests/unload_solution_tests.cpp')
-rw-r--r--src/script/tests/unload_solution_tests.cpp74
1 files changed, 0 insertions, 74 deletions
diff --git a/src/script/tests/unload_solution_tests.cpp b/src/script/tests/unload_solution_tests.cpp
deleted file mode 100644
index eef5668..0000000
--- a/src/script/tests/unload_solution_tests.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * \file unload_solution_tests.cpp
- * \brief Automated tests for solution object unloading from the script environment.
- * \author Copyright (c) 2007-2008 Jason Perkins and the Premake project
- */
-
-#include "premake.h"
-#include "testing/testing.h"
-extern "C" {
-#include "script/script_internal.h"
-}
-
-
-struct FxUnloadSolution
-{
- Script script;
- lua_State* L;
- Solution sln;
-
- FxUnloadSolution()
- {
- script = script_create();
- L = script_get_lua(script);
-
- sln = solution_create();
-
- script_run_string(script,
- "sln = solution('MySolution');"
- " configurations { 'Debug', 'Release' };"
- " sln.basedir = '/basedir';"
- " location 'location';"
- "return sln");
- }
-
- ~FxUnloadSolution()
- {
- solution_destroy(sln);
- script_destroy(script);
- }
-};
-
-
-SUITE(unload)
-{
- TEST_FIXTURE(FxUnloadSolution, UnloadSolution_SetsName)
- {
- unload_solution(L, sln);
- const char* result = solution_get_name(sln);
- CHECK_EQUAL("MySolution", result);
- }
-
- TEST_FIXTURE(FxUnloadSolution, UnloadSolution_SetsBaseDir)
- {
- unload_solution(L, sln);
- const char* result = solution_get_base_dir(sln);
- CHECK_EQUAL("/basedir", result);
- }
-
- TEST_FIXTURE(FxUnloadSolution, UnloadSolution_SetsConfigurations)
- {
- unload_solution(L, sln);
- CHECK(solution_num_configs(sln) == 2);
- CHECK_EQUAL("Debug", solution_get_config(sln, 0));
- CHECK_EQUAL("Release", solution_get_config(sln, 1));
- }
-
- TEST_FIXTURE(FxUnloadSolution, UnloadSolution_SetsLocation)
- {
- unload_solution(L, sln);
- const char* result = solution_get_location(sln);
- CHECK_EQUAL("/basedir/location", result);
- }
-}
-