From 1dd659ce78ddb13e41beff7cd1d6ea29ec80b082 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 19 Feb 2011 05:13:57 -0800 Subject: [PATCH 1/2] vs 2010 is the new default --- eressea.sln | 21 +++++++++++++-------- eressea_10.sln => eressea_vs2009.sln | 21 ++++++++------------- scripts/e3a/modules.lua | 1 + scripts/tests/e3a.lua | 28 +++++++++++++++++++++++++++- 4 files changed, 49 insertions(+), 22 deletions(-) rename eressea_10.sln => eressea_vs2009.sln (70%) diff --git a/eressea.sln b/eressea.sln index 27611d68c..9c4a3c434 100644 --- a/eressea.sln +++ b/eressea.sln @@ -1,16 +1,18 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C++ Express 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kernel", "..\shared\src\kernel.vcproj", "{6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D}" +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kernel", "..\shared\src\kernel.vcxproj", "{6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gamecode", "..\shared\src\gamecode.vcproj", "{1E8BFF9E-3044-0742-992F-C5765B80FE65}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gamecode", "..\shared\src\gamecode.vcxproj", "{1E8BFF9E-3044-0742-992F-C5765B80FE65}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util", "..\shared\src\util.vcproj", "{F70CFB27-8A2F-E447-B452-4E1C590EDA6D}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util", "..\shared\src\util.vcxproj", "{F70CFB27-8A2F-E447-B452-4E1C590EDA6D}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-bindings", "..\shared\src\lua-bindings.vcproj", "{75501170-51C2-E641-BA8B-EDC008184192}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-bindings", "..\shared\src\lua-bindings.vcxproj", "{75501170-51C2-E641-BA8B-EDC008184192}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "external", "..\external\external.vcproj", "{F9AE4586-8F65-486B-9666-744839E40A54}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "external", "..\external\external.vcxproj", "{F9AE4586-8F65-486B-9666-744839E40A54}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "amalgamation-eressea", "src\eressea.vcproj", "{AD80EB0B-7CB4-42F2-9C95-8CCEF68DB387}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "amalgamation-eressea", "src\eressea.vcxproj", "{AD80EB0B-7CB4-42F2-9C95-8CCEF68DB387}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "amalgamation-example", "..\example\src\example.vcxproj", "{4A17DAEE-2261-4E2C-96F6-BA4132A09551}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -36,6 +38,9 @@ Global {AD80EB0B-7CB4-42F2-9C95-8CCEF68DB387}.Debug|Win32.ActiveCfg = Debug|Win32 {AD80EB0B-7CB4-42F2-9C95-8CCEF68DB387}.Debug|Win32.Build.0 = Debug|Win32 {AD80EB0B-7CB4-42F2-9C95-8CCEF68DB387}.Release|Win32.ActiveCfg = Release|Win32 + {4A17DAEE-2261-4E2C-96F6-BA4132A09551}.Debug|Win32.ActiveCfg = Debug|Win32 + {4A17DAEE-2261-4E2C-96F6-BA4132A09551}.Debug|Win32.Build.0 = Debug|Win32 + {4A17DAEE-2261-4E2C-96F6-BA4132A09551}.Release|Win32.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/eressea_10.sln b/eressea_vs2009.sln similarity index 70% rename from eressea_10.sln rename to eressea_vs2009.sln index 9c4a3c434..27611d68c 100644 --- a/eressea_10.sln +++ b/eressea_vs2009.sln @@ -1,18 +1,16 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual C++ Express 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kernel", "..\shared\src\kernel.vcxproj", "{6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D}" +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kernel", "..\shared\src\kernel.vcproj", "{6F104C0A-DDF5-A34B-A89C-0DC278DCEF6D}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gamecode", "..\shared\src\gamecode.vcxproj", "{1E8BFF9E-3044-0742-992F-C5765B80FE65}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gamecode", "..\shared\src\gamecode.vcproj", "{1E8BFF9E-3044-0742-992F-C5765B80FE65}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util", "..\shared\src\util.vcxproj", "{F70CFB27-8A2F-E447-B452-4E1C590EDA6D}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util", "..\shared\src\util.vcproj", "{F70CFB27-8A2F-E447-B452-4E1C590EDA6D}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-bindings", "..\shared\src\lua-bindings.vcxproj", "{75501170-51C2-E641-BA8B-EDC008184192}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-bindings", "..\shared\src\lua-bindings.vcproj", "{75501170-51C2-E641-BA8B-EDC008184192}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "external", "..\external\external.vcxproj", "{F9AE4586-8F65-486B-9666-744839E40A54}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "external", "..\external\external.vcproj", "{F9AE4586-8F65-486B-9666-744839E40A54}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "amalgamation-eressea", "src\eressea.vcxproj", "{AD80EB0B-7CB4-42F2-9C95-8CCEF68DB387}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "amalgamation-example", "..\example\src\example.vcxproj", "{4A17DAEE-2261-4E2C-96F6-BA4132A09551}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "amalgamation-eressea", "src\eressea.vcproj", "{AD80EB0B-7CB4-42F2-9C95-8CCEF68DB387}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -38,9 +36,6 @@ Global {AD80EB0B-7CB4-42F2-9C95-8CCEF68DB387}.Debug|Win32.ActiveCfg = Debug|Win32 {AD80EB0B-7CB4-42F2-9C95-8CCEF68DB387}.Debug|Win32.Build.0 = Debug|Win32 {AD80EB0B-7CB4-42F2-9C95-8CCEF68DB387}.Release|Win32.ActiveCfg = Release|Win32 - {4A17DAEE-2261-4E2C-96F6-BA4132A09551}.Debug|Win32.ActiveCfg = Debug|Win32 - {4A17DAEE-2261-4E2C-96F6-BA4132A09551}.Debug|Win32.Build.0 = Debug|Win32 - {4A17DAEE-2261-4E2C-96F6-BA4132A09551}.Release|Win32.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/scripts/e3a/modules.lua b/scripts/e3a/modules.lua index 60045005a..21bad0219 100644 --- a/scripts/e3a/modules.lua +++ b/scripts/e3a/modules.lua @@ -10,4 +10,5 @@ tests = { srcpath .. '/shared/scripts/tests/common.lua', srcpath .. '/eressea/scripts/tests/e3a.lua', srcpath .. '/eressea/scripts/tests/stealth.lua', + srcpath .. '/eressea/scripts/tests/bson.lua', } diff --git a/scripts/tests/e3a.lua b/scripts/tests/e3a.lua index 20d0b396e..0e8df42ba 100644 --- a/scripts/tests/e3a.lua +++ b/scripts/tests/e3a.lua @@ -1,6 +1,6 @@ require "lunit" -module( "e3", package.seeall, lunit.testcase ) +module("e3", package.seeall, lunit.testcase) function setup() free_game() @@ -14,6 +14,13 @@ function has_attrib(u, value) return false end +function test_attrib_global() + a = attrib.create('global', {}) + write_game('attrib.dat') + free_game() + read_game('attrib.dat') +end + function test_attrib() local r = region.create(0,0, "plain") local f = faction.create("noreply@eressea.de", "human", "de") @@ -62,6 +69,25 @@ function test_no_stealth() assert_equal(-1, u:get_skill("stealth")) end +--[[ +function test_analyze_magic() + local r1 = region.create(0,0, "plain") + local r2 = region.create(1,0, "plain") + local f = faction.create("noreply@eressea.de", "human", "de") + + local u = unit.create(f, r2, 1) + + u.race = "elf" + u:set_skill("magic", 6) + u.magic = "gwyrrd" + u.aura = 60 + u:add_spell("analyze_magic") + u:clear_orders() + u:add_order("Zaubere stufe 2 'Magie analysieren' REGION 1,0") + process_orders() +end +]]-- + function test_seecast() local r = region.create(0,0, "plain") for i = 1,10 do From e6ccccf05474b935c6b8d6d2e7504824649face2 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 19 Feb 2011 06:17:08 -0800 Subject: [PATCH 2/2] * move the bson tests * include the spells tests --- scripts/e3a/modules.lua | 5 +++-- scripts/eressea/modules.lua | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/e3a/modules.lua b/scripts/e3a/modules.lua index 21bad0219..af37a3389 100644 --- a/scripts/e3a/modules.lua +++ b/scripts/e3a/modules.lua @@ -5,10 +5,11 @@ require "e3a.markets" local srcpath = config.source_dir tests = { + srcpath .. '/shared/scripts/tests/common.lua', + srcpath .. '/shared/scripts/tests/spells.lua', + srcpath .. '/shared/scripts/tests/bson.lua', srcpath .. '/eressea/scripts/tests/castles.lua', srcpath .. '/eressea/scripts/tests/morale.lua', - srcpath .. '/shared/scripts/tests/common.lua', srcpath .. '/eressea/scripts/tests/e3a.lua', srcpath .. '/eressea/scripts/tests/stealth.lua', - srcpath .. '/eressea/scripts/tests/bson.lua', } diff --git a/scripts/eressea/modules.lua b/scripts/eressea/modules.lua index b70af6e57..b04f0528b 100644 --- a/scripts/eressea/modules.lua +++ b/scripts/eressea/modules.lua @@ -17,5 +17,7 @@ require "eressea.ents" local srcpath = config.source_dir tests = { srcpath .. '/shared/scripts/tests/common.lua', + srcpath .. '/shared/scripts/tests/spells.lua', + srcpath .. '/shared/scripts/tests/bson.lua', srcpath .. '/eressea/scripts/tests/eressea.lua', }