diff --git a/tests/actions/make/cpp/test_objects.lua b/tests/actions/make/cpp/test_objects.lua index de048ed9..145a0283 100644 --- a/tests/actions/make/cpp/test_objects.lua +++ b/tests/actions/make/cpp/test_objects.lua @@ -1,12 +1,12 @@ -- -- tests/actions/make/cpp/test_objects.lua -- Validate the list of objects for a makefile. --- Copyright (c) 2009-2014 Jason Perkins and the Premake project +-- Copyright (c) 2009-2015 Jason Perkins and the Premake project -- local suite = test.declare("make_cpp_objects") - local make = premake.make - local project = premake.project + + local p = premake -- @@ -20,8 +20,8 @@ end local function prepare() - prj = premake.solution.getproject(wks, 1) - make.cppObjects(prj) + prj = test.getproject(wks, 1) + p.make.cppObjects(prj) end diff --git a/tests/actions/make/workspace/test_default_config.lua b/tests/actions/make/workspace/test_default_config.lua index 86f9a890..a4bd0a80 100644 --- a/tests/actions/make/workspace/test_default_config.lua +++ b/tests/actions/make/workspace/test_default_config.lua @@ -1,12 +1,12 @@ -- -- tests/actions/make/test_default_config.lua -- Validate generation of default configuration block for makefiles. --- Copyright (c) 2012 Jason Perkins and the Premake project +-- Copyright (c) 2012-2015 Jason Perkins and the Premake project -- - T.make_default_config = {} - local suite = T.make_default_config - local make = premake.make + local suite = test.declare("make_default_config") + + local p = premake -- @@ -20,8 +20,8 @@ end local function prepare() - prj = premake.workspace.getproject(wks, 1) - make.defaultconfig(prj) + prj = test.getproject(wks, 1) + p.make.defaultconfig(prj) end @@ -55,7 +55,7 @@ endif -- --- If the project excludes a solution build cfg, it should be skipped +-- If the project excludes a workspace build cfg, it should be skipped -- over as the default config as well. -- diff --git a/tests/actions/make/workspace/test_group_rule.lua b/tests/actions/make/workspace/test_group_rule.lua index 9ac08ff5..16000841 100644 --- a/tests/actions/make/workspace/test_group_rule.lua +++ b/tests/actions/make/workspace/test_group_rule.lua @@ -1,5 +1,5 @@ -- --- tests/actions/make/solution/test_group_rule.lua +-- tests/actions/make/workspace/test_group_rule.lua -- Validate generation of group rules -- Copyright (c) 2012-2015 Jason Perkins and the Premake project -- @@ -31,7 +31,7 @@ -- --- Groups should be added to solution's PHONY +-- Groups should be added to workspace's PHONY -- function suite.groupRule_groupAsPhony() @@ -42,8 +42,10 @@ ]] end + + -- --- Transform solution groups into target aggregate +-- Transform workspace groups into target aggregate -- function suite.groupRule_groupRules() prepare() diff --git a/tests/actions/make/workspace/test_project_rule.lua b/tests/actions/make/workspace/test_project_rule.lua index 6ad94d06..3fd94dd7 100644 --- a/tests/actions/make/workspace/test_project_rule.lua +++ b/tests/actions/make/workspace/test_project_rule.lua @@ -1,6 +1,6 @@ -- --- tests/actions/make/solution/test_project_rule.lua --- Validate generation of project rules in solution makefile. +-- tests/actions/make/workspace/test_project_rule.lua +-- Validate generation of project rules in workspace makefile. -- Copyright (c) 2012-2015 Jason Perkins and the Premake project -- diff --git a/tests/actions/vstudio/cs2005/projectsettings.lua b/tests/actions/vstudio/cs2005/projectsettings.lua index 57d3b5e4..6cb833dc 100755 --- a/tests/actions/vstudio/cs2005/projectsettings.lua +++ b/tests/actions/vstudio/cs2005/projectsettings.lua @@ -1,11 +1,11 @@ -- -- tests/actions/vstudio/cs2005/projectsettings.lua -- Validate generation of root in Visual Studio 2005+ .csproj --- Copyright (c) 2009-2012 Jason Perkins and the Premake project +-- Copyright (c) 2009-2015 Jason Perkins and the Premake project -- - T.vstudio_cs2005_projectsettings = { } - local suite = T.vstudio_cs2005_projectsettings + local suite = test.declare("vstudio_cs2005_projectsettings") + local cs2005 = premake.vstudio.cs2005 @@ -23,7 +23,7 @@ end local function prepare() - prj = premake.solution.getproject(wks, 1) + prj = test.getproject(wks, 1) cs2005.projectProperties(prj) end diff --git a/tests/actions/vstudio/cs2005/test_assembly_refs.lua b/tests/actions/vstudio/cs2005/test_assembly_refs.lua index 0a2638dd..e6666304 100644 --- a/tests/actions/vstudio/cs2005/test_assembly_refs.lua +++ b/tests/actions/vstudio/cs2005/test_assembly_refs.lua @@ -1,11 +1,11 @@ -- -- tests/actions/vstudio/cs2005/test_assembly_refs.lua -- Test the assembly linking block of a Visual Studio 2005+ C# project. --- Copyright (c) 2012 Jason Perkins and the Premake project +-- Copyright (c) 2012-2015 Jason Perkins and the Premake project -- - T.vstudio_cs2005_assembly_refs = {} - local suite = T.vstudio_cs2005_assembly_refs + local suite = test.declare("vstudio_cs2005_assembly_refs") + local cs2005 = premake.vstudio.cs2005 @@ -22,7 +22,7 @@ end local function prepare(platform) - prj = premake.solution.getproject(wks, 1) + prj = test.getproject(wks, 1) cs2005.assemblyReferences(prj) end diff --git a/tests/actions/vstudio/cs2005/test_build_events.lua b/tests/actions/vstudio/cs2005/test_build_events.lua index b42fd93a..950444ad 100644 --- a/tests/actions/vstudio/cs2005/test_build_events.lua +++ b/tests/actions/vstudio/cs2005/test_build_events.lua @@ -20,7 +20,7 @@ end local function prepare(platform) - prj = premake.solution.getproject(wks, 1) + prj = test.getproject(wks, 1) cs2005.buildEvents(prj) end diff --git a/tests/actions/vstudio/cs2005/test_common_props.lua b/tests/actions/vstudio/cs2005/test_common_props.lua index 35a8d145..cb03c86c 100644 --- a/tests/actions/vstudio/cs2005/test_common_props.lua +++ b/tests/actions/vstudio/cs2005/test_common_props.lua @@ -21,7 +21,7 @@ end local function prepare() - prj = premake.solution.getproject(wks, 1) + prj = test.getproject(wks, 1) cs2005.commonProperties(prj) end diff --git a/tests/actions/vstudio/cs2005/test_files.lua b/tests/actions/vstudio/cs2005/test_files.lua index 64c7494e..f2f086f9 100755 --- a/tests/actions/vstudio/cs2005/test_files.lua +++ b/tests/actions/vstudio/cs2005/test_files.lua @@ -19,7 +19,7 @@ end local function prepare() - prj = premake.solution.getproject(wks, 1) + prj = test.getproject(wks, 1) cs2005.files(prj) end diff --git a/tests/actions/vstudio/cs2005/test_icon.lua b/tests/actions/vstudio/cs2005/test_icon.lua index f1bfde06..778d6146 100644 --- a/tests/actions/vstudio/cs2005/test_icon.lua +++ b/tests/actions/vstudio/cs2005/test_icon.lua @@ -19,7 +19,7 @@ end local function prepare() - prj = premake.solution.getproject(wks, 1) + prj = test.getproject(wks, 1) cs2005.applicationIcon(prj) end diff --git a/tests/actions/vstudio/cs2005/test_platform_groups.lua b/tests/actions/vstudio/cs2005/test_platform_groups.lua index 1b426158..fe120e6d 100644 --- a/tests/actions/vstudio/cs2005/test_platform_groups.lua +++ b/tests/actions/vstudio/cs2005/test_platform_groups.lua @@ -15,7 +15,7 @@ function suite.setup() _ACTION = "vs2010" - wks = solution("MySolution") + wks = workspace("MyWorkspace") configurations { "Debug", "Release" } language "C#" end diff --git a/tests/actions/vstudio/cs2005/test_project_refs.lua b/tests/actions/vstudio/cs2005/test_project_refs.lua index 666956a9..c4fb92ee 100644 --- a/tests/actions/vstudio/cs2005/test_project_refs.lua +++ b/tests/actions/vstudio/cs2005/test_project_refs.lua @@ -23,7 +23,7 @@ end local function prepare(platform) - prj = premake.solution.getproject(wks, 2) + prj = test.getproject(wks, 2) cs2005.projectReferences(prj) end diff --git a/tests/actions/vstudio/cs2005/test_targets.lua b/tests/actions/vstudio/cs2005/test_targets.lua index 6c46ce15..7fcb308b 100644 --- a/tests/actions/vstudio/cs2005/test_targets.lua +++ b/tests/actions/vstudio/cs2005/test_targets.lua @@ -21,7 +21,7 @@ end local function prepare() - prj = premake.solution.getproject(wks, 1) + prj = test.getproject(wks, 1) cs2005.targets(prj) end diff --git a/tests/actions/vstudio/sln2005/test_dependencies.lua b/tests/actions/vstudio/sln2005/test_dependencies.lua index c34e88db..1dd14b48 100755 --- a/tests/actions/vstudio/sln2005/test_dependencies.lua +++ b/tests/actions/vstudio/sln2005/test_dependencies.lua @@ -30,10 +30,10 @@ local function prepare(language) prj1.language = language prj2.language = language - prj2 = premake.solution.getproject(wks, 2) + prj2 = test.getproject(wks, 2) sln2005.projectdependencies(prj2) prj3.language = language - prj3 = premake.solution.getproject(wks, 3) + prj3 = test.getproject(wks, 3) sln2005.projectdependencies(prj3) end diff --git a/tests/actions/vstudio/sln2005/test_nested_projects.lua b/tests/actions/vstudio/sln2005/test_nested_projects.lua index edae75f1..7d104f46 100644 --- a/tests/actions/vstudio/sln2005/test_nested_projects.lua +++ b/tests/actions/vstudio/sln2005/test_nested_projects.lua @@ -1,11 +1,11 @@ -- -- tests/actions/vstudio/sln2005/test_nested_projects.lua -- Check Visual Studio 2005+ Nested Projects solution block. --- Copyright (c) 2012 Jason Perkins and the Premake project +-- Copyright (c) 2012-2015 Jason Perkins and the Premake project -- - T.vstudio_sln2005_nested_projects = { } - local suite = T.vstudio_sln2005_nested_projects + local suite = test.declare("vstudio_sln2005_nested_projects") + local sln2005 = premake.vstudio.sln2005 @@ -17,7 +17,7 @@ function suite.setup() _ACTION = "vs2008" - wks = solution "MySolution" + wks = workspace("MyWorkspace") configurations { "Debug", "Release" } language "C++" kind "ConsoleApp" diff --git a/tests/actions/vstudio/sln2005/test_platforms.lua b/tests/actions/vstudio/sln2005/test_platforms.lua index 8d000e89..1cdcd80f 100644 --- a/tests/actions/vstudio/sln2005/test_platforms.lua +++ b/tests/actions/vstudio/sln2005/test_platforms.lua @@ -16,7 +16,7 @@ function suite.setup() _ACTION = "vs2008" - wks = solution("MySolution") + wks = workspace("MyWorkspace") configurations { "Debug", "Release" } language "C++" end diff --git a/tests/actions/vstudio/sln2005/test_projects.lua b/tests/actions/vstudio/sln2005/test_projects.lua index b2d9cba2..91d67b7d 100755 --- a/tests/actions/vstudio/sln2005/test_projects.lua +++ b/tests/actions/vstudio/sln2005/test_projects.lua @@ -16,7 +16,7 @@ function suite.setup() premake.escaper(premake.vstudio.vs2005.esc) - wks = solution "MySolution" + wks = workspace("MyWorkspace") configurations { "Debug", "Release" } language "C++" kind "ConsoleApp" diff --git a/tests/actions/vstudio/vc200x/test_assembly_refs.lua b/tests/actions/vstudio/vc200x/test_assembly_refs.lua index 92e62867..fd27d072 100644 --- a/tests/actions/vstudio/vc200x/test_assembly_refs.lua +++ b/tests/actions/vstudio/vc200x/test_assembly_refs.lua @@ -20,7 +20,7 @@ end local function prepare(platform) - prj = premake.solution.getproject(wks, 1) + prj = test.getproject(wks, 1) vc200x.assemblyReferences(prj) end diff --git a/tests/actions/vstudio/vc200x/test_configuration.lua b/tests/actions/vstudio/vc200x/test_configuration.lua index 3fb17c5e..b5dadfc3 100755 --- a/tests/actions/vstudio/vc200x/test_configuration.lua +++ b/tests/actions/vstudio/vc200x/test_configuration.lua @@ -51,7 +51,7 @@ -- function suite.usesWin32_onX86() - solution "MySolution" + workspace("MyWorkspace") platforms { "x86" } prepare() test.capture [[ diff --git a/tests/actions/vstudio/vc200x/test_excluded_configs.lua b/tests/actions/vstudio/vc200x/test_excluded_configs.lua index 4b5c7a80..f4850b1c 100644 --- a/tests/actions/vstudio/vc200x/test_excluded_configs.lua +++ b/tests/actions/vstudio/vc200x/test_excluded_configs.lua @@ -17,7 +17,7 @@ function suite.setup() _ACTION = "vs2008" - wks = solution("MySolution") + wks = workspace("MyWorkspace") configurations { "Debug", "Release" } platforms { "Zeus", "Ares" } language "C++" diff --git a/tests/actions/vstudio/vc200x/test_platforms.lua b/tests/actions/vstudio/vc200x/test_platforms.lua index 3cd1e503..d1c4f179 100755 --- a/tests/actions/vstudio/vc200x/test_platforms.lua +++ b/tests/actions/vstudio/vc200x/test_platforms.lua @@ -21,7 +21,7 @@ end local function prepare() - prj = premake.solution.getproject(wks, 1) + prj = test.getproject(wks, 1) vc200x.platforms(prj) end diff --git a/tests/actions/vstudio/vc200x/test_project.lua b/tests/actions/vstudio/vc200x/test_project.lua index 4df60785..bd2a39af 100644 --- a/tests/actions/vstudio/vc200x/test_project.lua +++ b/tests/actions/vstudio/vc200x/test_project.lua @@ -21,7 +21,7 @@ end local function prepare() - prj = premake.solution.getproject(wks, 1) + prj = test.getproject(wks, 1) vc200x.visualStudioProject(prj) end diff --git a/tests/actions/vstudio/vc200x/test_project_refs.lua b/tests/actions/vstudio/vc200x/test_project_refs.lua index d757ebbf..3699395c 100644 --- a/tests/actions/vstudio/vc200x/test_project_refs.lua +++ b/tests/actions/vstudio/vc200x/test_project_refs.lua @@ -23,7 +23,7 @@ end local function prepare(platform) - prj = premake.solution.getproject(wks, 2) + prj = test.getproject(wks, 2) vc200x.projectReferences(prj) end diff --git a/tests/actions/vstudio/vc2010/test_assembly_refs.lua b/tests/actions/vstudio/vc2010/test_assembly_refs.lua index cd54f606..c0b5b619 100644 --- a/tests/actions/vstudio/vc2010/test_assembly_refs.lua +++ b/tests/actions/vstudio/vc2010/test_assembly_refs.lua @@ -20,7 +20,7 @@ end local function prepare(platform) - prj = premake.solution.getproject(wks, 1) + prj = test.getproject(wks, 1) vc2010.assemblyReferences(prj) end diff --git a/tests/actions/vstudio/vc2010/test_build_events.lua b/tests/actions/vstudio/vc2010/test_build_events.lua index 5290b7f8..1efed369 100644 --- a/tests/actions/vstudio/vc2010/test_build_events.lua +++ b/tests/actions/vstudio/vc2010/test_build_events.lua @@ -20,7 +20,7 @@ end local function prepare(platform) - prj = premake.solution.getproject(wks, 1) + prj = test.getproject(wks, 1) vc2010.buildEvents(prj) end diff --git a/tests/actions/vstudio/vc2010/test_excluded_configs.lua b/tests/actions/vstudio/vc2010/test_excluded_configs.lua index 14261a5f..8266201a 100644 --- a/tests/actions/vstudio/vc2010/test_excluded_configs.lua +++ b/tests/actions/vstudio/vc2010/test_excluded_configs.lua @@ -17,7 +17,7 @@ function suite.setup() _ACTION = "vs2010" - wks = solution("MySolution") + wks = workspace("MyWorkspace") configurations { "Debug", "Release" } platforms { "Zeus", "Ares" } language "C++" diff --git a/tests/actions/vstudio/vc2010/test_files.lua b/tests/actions/vstudio/vc2010/test_files.lua index c8c05c06..affef5e8 100755 --- a/tests/actions/vstudio/vc2010/test_files.lua +++ b/tests/actions/vstudio/vc2010/test_files.lua @@ -29,7 +29,7 @@ end local function prepare() - prj = premake.solution.getproject(wks, 1) + prj = test.getproject(wks, 1) vc2010.files(prj) end diff --git a/tests/actions/vstudio/vc2010/test_globals.lua b/tests/actions/vstudio/vc2010/test_globals.lua index 2189ff6e..2aa3bdb2 100755 --- a/tests/actions/vstudio/vc2010/test_globals.lua +++ b/tests/actions/vstudio/vc2010/test_globals.lua @@ -20,7 +20,7 @@ end local function prepare() - prj = premake.solution.getproject(wks, 1) + prj = test.getproject(wks, 1) vc2010.globals(prj) end diff --git a/tests/actions/vstudio/vc2010/test_project_configs.lua b/tests/actions/vstudio/vc2010/test_project_configs.lua index 6f84a0c9..e290409f 100755 --- a/tests/actions/vstudio/vc2010/test_project_configs.lua +++ b/tests/actions/vstudio/vc2010/test_project_configs.lua @@ -20,7 +20,7 @@ end local function prepare() - prj = premake.solution.getproject(wks, 1) + prj = test.getproject(wks, 1) vc2010.projectConfigurations(prj) end diff --git a/tests/actions/vstudio/vc2010/test_project_refs.lua b/tests/actions/vstudio/vc2010/test_project_refs.lua index cbe577ed..19a5d4a4 100644 --- a/tests/actions/vstudio/vc2010/test_project_refs.lua +++ b/tests/actions/vstudio/vc2010/test_project_refs.lua @@ -23,7 +23,7 @@ end local function prepare(platform) - prj = premake.solution.getproject(wks, 2) + prj = test.getproject(wks, 2) vc2010.projectReferences(prj) end diff --git a/tests/api/test_containers.lua b/tests/api/test_containers.lua index 32fd1af6..5406dc63 100644 --- a/tests/api/test_containers.lua +++ b/tests/api/test_containers.lua @@ -1,6 +1,6 @@ -- -- tests/api/test_containers.lua --- Tests the API's solution() and project() container definitions. +-- Tests the API's workspace() and project() container definitions. -- Copyright (c) 2013-2014 Jason Perkins and the Premake project -- @@ -23,13 +23,13 @@ -- The first time a name is encountered, a new container should be created. -- - function suite.solution_createsOnFirstUse() + function suite.workspace_createsOnFirstUse() test.isnotnil(premake.global.getWorkspace("MyWorkspace")) end function suite.project_createsOnFirstUse() project("MyProject") - test.isnotnil(premake.solution.getproject(wks, "MyProject")) + test.isnotnil(test.getproject(wks, "MyProject")) end @@ -37,8 +37,8 @@ -- When a container is created, it should become the active scope. -- - function suite.solution_setsActiveScope() - test.issame(api.scope.solution, wks) + function suite.workspace_setsActiveScope() + test.issame(api.scope.workspace, wks) end function suite.project_setsActiveScope() @@ -52,11 +52,11 @@ -- become the current scope. -- - function suite.solution_setsActiveScope_onNoArgs() + function suite.workspace_setsActiveScope_onNoArgs() project("MyProject") group("MyGroup") - solution() - test.issame(wks, api.scope.solution) + workspace() + test.issame(wks, api.scope.workspace) test.isnil(api.scope.project) test.isnil(api.scope.group) end @@ -73,12 +73,12 @@ -- The "*" name should activate the parent scope. -- - function suite.solution_onStar() + function suite.workspace_onStar() project("MyProject") group("MyGroup") filter("Debug") - solution "*" - test.isnil(api.scope.solution) + workspace("*") + test.isnil(api.scope.workspace) test.isnil(api.scope.project) test.isnil(api.scope.group) end @@ -88,6 +88,6 @@ group("MyGroup") filter("Debug") project "*" - test.issame(wks, api.scope.solution) + test.issame(wks, api.scope.workspace) test.isnil(api.scope.project) end diff --git a/tests/base/test_filename.lua b/tests/base/test_filename.lua index 71cde306..1279024e 100644 --- a/tests/base/test_filename.lua +++ b/tests/base/test_filename.lua @@ -1,6 +1,6 @@ -- -- tests/base/test_filename.lua --- Verify generation of project/solution/rule filenames. +-- Verify generation of project/workspace/rule filenames. -- Copyright (c) 2008-2014 Jason Perkins and the Premake project -- @@ -67,10 +67,10 @@ -- --- Should also work with solutions. +-- Should also work with workspaces. -- - function suite.worksWithSolution() + function suite.worksWithWorkspace() prepare() test.isequal("MySolution", path.getname(p.filename(wks))) end @@ -81,7 +81,7 @@ -- function suite.doesNotPropagate() - solution ("MySolution") + workspace ("MyWorkspace") filename ("Howdy") prepare() test.isequal("MyProject", path.getname(p.filename(prj))) diff --git a/tests/base/test_validation.lua b/tests/base/test_validation.lua index 979bd50a..509d9427 100644 --- a/tests/base/test_validation.lua +++ b/tests/base/test_validation.lua @@ -23,7 +23,7 @@ -- function suite.passes_onSane() - solution "MySolution" + workspace("MyWorkspace") configurations { "Debug", "Release" } project "MyProject" kind "ConsoleApp" @@ -33,11 +33,11 @@ -- --- Fail if no configurations are present on the solution. +-- Fail if no configurations are present on the workspace. -- - function suite.fails_onNoSolutionConfigs() - solution "MySolution" + function suite.fails_onNoWorkspaceConfigs() + workspace "MyWorkspace" project "MyProject" kind "ConsoleApp" language "C++" @@ -50,7 +50,7 @@ -- function suite.fails_onDuplicateProjectIDs() - solution "MySolution" + workspace "MyWorkspace" configurations { "Debug", "Release" } kind "ConsoleApp" language "C++" @@ -67,7 +67,7 @@ -- function suite.fails_onNoConfigKind() - solution "MySolution" + workspace "MyWorkspace" configurations { "Debug", "Release" } project "MyProject" language "C++" @@ -79,8 +79,8 @@ -- Warn if a configuration value is set in the wrong scope. -- - function suite.warns_onSolutionStringField_inConfig() - solution "MySolution" + function suite.warns_onWorkspaceStringField_inConfig() + workspace "MyWorkspace" configurations { "Debug", "Release" } filter "Debug" startproject "MyProject" @@ -92,7 +92,7 @@ end function suite.warns_onProjectStringField_inConfig() - solution "MySolution" + workspace "MyWorkspace" configurations { "Debug", "Release" } project "MyProject" kind "ConsoleApp" @@ -104,7 +104,7 @@ end function suite.warns_onProjectListField_inConfig() - solution "MySolution" + workspace "MyWorkspace" configurations { "Debug", "Release" } project "MyProject" kind "ConsoleApp" @@ -121,7 +121,7 @@ -- function suite.fails_onNoSuchRule() - solution "MySolution" + workspace "MyWorkspace" configurations { "Debug", "Release" } project "MyProject" rules { "NoSuchRule" } diff --git a/tests/oven/test_filtering.lua b/tests/oven/test_filtering.lua index 92b1a5d8..d7bb07dd 100644 --- a/tests/oven/test_filtering.lua +++ b/tests/oven/test_filtering.lua @@ -5,22 +5,20 @@ -- local suite = test.declare("oven_filtering") - local oven = premake.oven - local solution = premake.solution - - local wks, prj -- -- Setup -- + local wks, prj + function suite.setup() wks = test.createWorkspace() end local function prepare() - wks = test.getsolution(wks) + wks = test.getWorkspace(wks) prj = test.getproject(wks, 1) end diff --git a/tests/oven/test_objdirs.lua b/tests/oven/test_objdirs.lua index 7583fcd0..51e60048 100644 --- a/tests/oven/test_objdirs.lua +++ b/tests/oven/test_objdirs.lua @@ -1,18 +1,18 @@ --- -- tests/oven/test_objdirs.lua -- Test the per-configuration object directory assignments. --- Copyright (c) 2014 Jason Perkins and the Premake project +-- Copyright (c) 2014-2015 Jason Perkins and the Premake project --- local suite = test.declare("oven_objdirs") local oven = premake.oven - local wks, prj - --- -- Setup --- + local wks, prj + function suite.setup() end @@ -24,7 +24,7 @@ function suite.singleProject_noPlatforms() - wks = solution "MySolution" + wks = workspace("MyWorkspace") configurations { "Debug", "Release" } prj = project "MyProject" @@ -34,7 +34,7 @@ function suite.multipleProjects_noPlatforms() - wks = solution "MySolution" + wks = workspace("MyWorkspace") configurations { "Debug", "Release" } prj = project "MyProject" project "MyProject2" @@ -45,7 +45,7 @@ function suite.singleProject_withPlatforms() - wks = solution "MySolution" + wks = workspace("MyWorkspace") configurations { "Debug", "Release" } platforms { "x86", "x86_64" } prj = project "MyProject" @@ -55,7 +55,7 @@ function suite.singleProject_uniqueByTokens_noPlatforms() - wks = solution "MySolution" + wks = workspace("MyWorkspace") configurations { "Debug", "Release" } prj = project "MyProject" objdir "obj/%{cfg.buildcfg}" @@ -65,7 +65,7 @@ function suite.singleProject_uniqueByTokens_withPlatforms() - wks = solution "MySolution" + wks = workspace("MyWorkspace") configurations { "Debug", "Release" } platforms { "x86", "x86_64" } prj = project "MyProject" @@ -76,7 +76,7 @@ function suite.allowOverlap_onPrefixCode() - wks = solution "MySolution" + wks = workspace("MyWorkspace") configurations { "Debug", "Release" } platforms { "x86", "x86_64" } prj = project "MyProject" diff --git a/tests/project/test_config_maps.lua b/tests/project/test_config_maps.lua index c07b35da..d8a963bd 100644 --- a/tests/project/test_config_maps.lua +++ b/tests/project/test_config_maps.lua @@ -1,6 +1,6 @@ -- -- tests/project/test_config_maps.lua --- Test mapping from solution to project configurations. +-- Test mapping from workspace to project configurations. -- Copyright (c) 2012-2014 Jason Perkins and the Premake project -- @@ -14,7 +14,7 @@ local wks, prj, cfg function suite.setup() - wks = solution("MySolution") + wks = workspace("MyWorkspace") configurations { "Debug", "Release" } end @@ -25,11 +25,11 @@ -- --- When no configuration is specified in the project, the solution +-- When no configuration is specified in the project, the workspace -- settings should map directly to a configuration object. -- - function suite.solutionConfig_onNoProjectConfigs() + function suite.workspaceConfig_onNoProjectConfigs() project ("MyProject") prepare() test.isequal("Debug", cfg.buildcfg) diff --git a/tests/project/test_eachconfig.lua b/tests/project/test_eachconfig.lua index bcd4b9d8..7ef4d903 100755 --- a/tests/project/test_eachconfig.lua +++ b/tests/project/test_eachconfig.lua @@ -1,11 +1,10 @@ -- -- tests/project/test_eachconfig.lua -- Test the project object configuration iterator function. --- Copyright (c) 2011-2012 Jason Perkins and the Premake project +-- Copyright (c) 2011-2015 Jason Perkins and the Premake project -- - T.project_eachconfig = { } - local suite = T.project_eachconfig + local suite = test.declare("project_eachconfig") -- @@ -15,7 +14,7 @@ local wks, prj function suite.setup() - wks = solution("MySolution") + wks = workspace("MyWorkspace") end local function prepare(buildcfgs) @@ -23,7 +22,7 @@ if buildcfgs then configurations ( buildcfgs ) end - prj = premake.solution.getproject(wks, 1) + prj = test.getproject(wks, 1) for cfg in premake.project.eachconfig(prj) do _p(2,'%s:%s', cfg.buildcfg or "", cfg.platform or "") end @@ -89,7 +88,7 @@ -- --- Test the mapping of a build configuration from solution to project. +-- Test the mapping of a build configuration from workspace to project. -- function suite.mapsBuildCfg_toBuildCfg() @@ -104,7 +103,7 @@ -- --- Test mapping a platform from solution to project. +-- Test mapping a platform from workspace to project. -- function suite.mapsPlatform_toPlatform() @@ -122,7 +121,7 @@ -- -- Test mapping a build configuration to a build config/platform pair. -- This will cause a second platform to appear in the project, alongside --- the one defined by the solution. +-- the one defined by the workspace. -- function suite.mapsBuildCfg_toBuildCfgAndPlatform() @@ -155,12 +154,12 @@ -- --- If there is overlap in the solution and project configuration lists, +-- If there is overlap in the workspace and project configuration lists, -- the ordering at the project level should be maintained to avoid -- unnecessarily dirtying the project file. -- - function suite.maintainsProjectOrdering_onSolutionOverlap() + function suite.maintainsProjectOrdering_onWorkspaceOverlap() configurations { "Debug", "Release" } prepare { "Debug", "Development", "Profile", "Release" } test.capture [[ diff --git a/tests/project/test_getconfig.lua b/tests/project/test_getconfig.lua index 6f74d6fa..34c55cb5 100755 --- a/tests/project/test_getconfig.lua +++ b/tests/project/test_getconfig.lua @@ -13,7 +13,7 @@ local wks, prj, cfg function suite.setup() - wks = solution("MySolution") + wks = workspace("MyWorkspace") configurations { "Debug", "Release" } end diff --git a/tests/project/test_location.lua b/tests/project/test_location.lua index eb67d1be..fb531eba 100644 --- a/tests/project/test_location.lua +++ b/tests/project/test_location.lua @@ -18,7 +18,7 @@ end local function prepare() - prj = premake.solution.getproject(wks, 1) + prj = test.getproject(wks, 1) end @@ -45,12 +45,12 @@ -- --- If the solution sets a location, and the project does not, it should --- inherit the value from the solution. +-- If the workspace sets a location, and the project does not, it should +-- inherit the value from the workspace. -- - function suite.inheritsSolutionLocation_onNoProjectLocation() - solution () + function suite.inheritsWorkspaceLocation_onNoProjectLocation() + workspace () location "build" prepare() test.isequal(path.join(os.getcwd(), "build"), prj.location) diff --git a/tests/workspace/test_eachconfig.lua b/tests/workspace/test_eachconfig.lua index 6f6b221b..c1936089 100644 --- a/tests/workspace/test_eachconfig.lua +++ b/tests/workspace/test_eachconfig.lua @@ -1,11 +1,12 @@ -- --- tests/solution/test_eachconfig.lua --- Automated test suite for the solution-level configuration iterator. --- Copyright (c) 2012 Jason Perkins and the Premake project +-- tests/workspace/test_eachconfig.lua +-- Automated test suite for the workspace-level configuration iterator. +-- Copyright (c) 2012-2015 Jason Perkins and the Premake project -- - T.solution_eachconfig = { } - local suite = T.solution_eachconfig + local suite = test.declare("workspace_eachconfig") + + local p = premake -- @@ -13,32 +14,33 @@ -- local wks + function suite.setup() - wks = solution("MySolution") + wks = workspace("MyWorkspace") end local function prepare() - _p(2,"-") - for cfg in premake.solution.eachconfig(wks) do - _p(2, "%s:%s", cfg.buildcfg or "", cfg.platform or "") + p.w("-") + for cfg in p.workspace.eachconfig(wks) do + p.w("%s:%s", cfg.buildcfg or "", cfg.platform or "") end - _p(2,"-") + p.w("-") end -- --- All configurations listed at the solution level should be enumerated. +-- All configurations listed at the workspace level should be enumerated. -- - function suite.listsBuildConfigurations_onSolutionLevel() + function suite.listsBuildConfigurations_onWorkspaceLevel() configurations { "Debug", "Release" } project("MyProject") prepare() test.capture [[ - - - Debug: - Release: - - +- +Debug: +Release: +- ]] end @@ -53,19 +55,19 @@ project("MyProject") prepare() test.capture [[ - - - Debug:x86 - Debug:x86_64 - Release:x86 - Release:x86_64 - - +- +Debug:x86 +Debug:x86_64 +Release:x86 +Release:x86_64 +- ]] end -- -- Configurations listed at the project level should *not* be included --- in the solution-level lists. +-- in the workspace-level lists. -- function suite.excludesProjectLevelConfigs() @@ -75,9 +77,9 @@ platforms { "x86", "x86_64" } prepare() test.capture [[ - - - Debug: - Release: - - +- +Debug: +Release: +- ]] end diff --git a/tests/workspace/test_location.lua b/tests/workspace/test_location.lua index 2488eb5f..6d658310 100644 --- a/tests/workspace/test_location.lua +++ b/tests/workspace/test_location.lua @@ -1,10 +1,10 @@ -- --- tests/solution/test_location.lua --- Test handling of the solution's location field. +-- tests/workspace/test_location.lua +-- Test handling of the workspace's location field. -- Copyright (c) 2013-2015 Jason Perkins and the Premake project -- - local suite = test.declare("solution_location") + local suite = test.declare("workspace_location") -- @@ -14,17 +14,17 @@ local wks function suite.setup() - wks = solution("MySolution") + wks = workspace("MyWorkspace") end local function prepare() - wks = test.getsolution(wks) + wks = test.getWorkspace(wks) end -- -- If no explicit location is set, the location should be set to the --- directory containing the script which defined the solution. +-- directory containing the script which defined the workspace. -- function suite.usesScriptLocation_onNoLocation() diff --git a/tests/workspace/test_objdirs.lua b/tests/workspace/test_objdirs.lua index a26f1933..452626ee 100644 --- a/tests/workspace/test_objdirs.lua +++ b/tests/workspace/test_objdirs.lua @@ -1,10 +1,10 @@ -- --- tests/solution/test_objdirs.lua --- Test the solution unique objects directory building. --- Copyright (c) 2012 Jason Perkins and the Premake project +-- tests/workspace/test_objdirs.lua +-- Test the workspace unique objects directory building. +-- Copyright (c) 2012-2015 Jason Perkins and the Premake project -- - local suite = test.declare("solution_objdir") + local suite = test.declare("workspace_objdir") -- @@ -15,7 +15,7 @@ function suite.setup() _ACTION = "test" - wks = solution("MySolution") + wks = workspace("MyWorkspace") system "macosx" end