diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-09-12 14:47:17 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-09-12 14:47:17 -0700 |
commit | 6010666be99cd0322babba1174cfbc65c776deb5 (patch) | |
tree | dad63b03b751394c169de61fbf2c195f4faf5344 /tests | |
parent | 38890204ed1f5f8dd34cced7c42fc9cf42dccab5 (diff) | |
parent | f9dff9b3f2e95b2ca8e5b8fd97538f301fd080fe (diff) |
Merge branch 'incoming'
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cmake/target_html/CMakeLists.txt | 13 | ||||
-rw-r--r-- | tests/cmake/target_js/CMakeLists.txt | 24 | ||||
-rw-r--r-- | tests/msvc10/glbook_15_Hello_Triangle_KD.vcxproj | 108 | ||||
-rw-r--r-- | tests/msvc10/tests_msvc10.sln | 197 | ||||
-rwxr-xr-x | tests/runner.py | 6 | ||||
-rw-r--r-- | tests/sdl_canvas_proxy.c | 34 | ||||
-rw-r--r-- | tests/sdl_canvas_proxy.png | bin | 0 -> 4488 bytes | |||
-rw-r--r-- | tests/sdl_key_proxy.c | 63 | ||||
-rw-r--r-- | tests/test_browser.py | 68 | ||||
-rw-r--r-- | tests/test_core.py | 102 | ||||
-rw-r--r-- | tests/test_other.py | 119 | ||||
-rw-r--r-- | tests/utf32.cpp | 53 |
12 files changed, 542 insertions, 245 deletions
diff --git a/tests/cmake/target_html/CMakeLists.txt b/tests/cmake/target_html/CMakeLists.txt index 9f891e71..b5c69417 100644 --- a/tests/cmake/target_html/CMakeLists.txt +++ b/tests/cmake/target_html/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 2.8) -project(hello_world_gles.html) +project(hello_world_gles) file(GLOB sourceFiles ../../hello_world_gles.c) @@ -10,5 +10,12 @@ else() # Either MinSizeRel, RelWithDebInfo or Release, all which run with optimi SET(linkFlags "-O2") endif() -add_executable(hello_world_gles.html ${sourceFiles}) -set_target_properties(hello_world_gles.html PROPERTIES LINK_FLAGS "${linkFlags}") +SET(CMAKE_EXECUTABLE_SUFFIX ".html") + +add_executable(hello_world_gles ${sourceFiles}) +set_target_properties(hello_world_gles PROPERTIES LINK_FLAGS "${linkFlags}") + +# Validating asm.js requires SpiderMonkey JS VM - detect its presence via the SPIDERMONKEY environment variable. +if (DEFINED ENV{SPIDERMONKEY} AND CMAKE_BUILD_TYPE STREQUAL Release) + em_validate_asmjs_after_build(hello_world_gles) +endif() diff --git a/tests/cmake/target_js/CMakeLists.txt b/tests/cmake/target_js/CMakeLists.txt index 860b70a9..cee5fc42 100644 --- a/tests/cmake/target_js/CMakeLists.txt +++ b/tests/cmake/target_js/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 2.8) -project(hello_world.js) +project(hello_world) file(GLOB sourceFiles ../../hello_world.cpp) @@ -10,5 +10,23 @@ else() # Either MinSizeRel, RelWithDebInfo or Release, all which run with optimi SET(linkFlags "-O2") endif() -add_executable(hello_world.js ${sourceFiles}) -set_target_properties(hello_world.js PROPERTIES LINK_FLAGS "${linkFlags}") +SET(CMAKE_EXECUTABLE_SUFFIX ".js") + +if (WIN32) + message(FATAL_ERROR "WIN32 should not be defined when cross-compiling!") +endif() + +if (APPLE) + message(FATAL_ERROR "APPLE should not be defined when cross-compiling!") +endif() + +if (NOT EMSCRIPTEN) + message(FATAL_ERROR "EMSCRIPTEN should be defined when cross-compiling!") +endif() + +if (NOT CMAKE_C_SIZEOF_DATA_PTR) + message(FATAL_ERROR "CMAKE_C_SIZEOF_DATA_PTR was not defined!") +endif() + +add_executable(hello_world ${sourceFiles}) +set_target_properties(hello_world PROPERTIES LINK_FLAGS "${linkFlags}") diff --git a/tests/msvc10/glbook_15_Hello_Triangle_KD.vcxproj b/tests/msvc10/glbook_15_Hello_Triangle_KD.vcxproj deleted file mode 100644 index 5d3026a2..00000000 --- a/tests/msvc10/glbook_15_Hello_Triangle_KD.vcxproj +++ /dev/null @@ -1,108 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Emscripten"> - <Configuration>Debug</Configuration> - <Platform>Emscripten</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Emscripten"> - <Configuration>Release</Configuration> - <Platform>Emscripten</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{A971FFED-3417-452B-B488-6D4F9F257847}</ProjectGuid> - <RootNamespace>glbook_15_Hello_Triangle_KD</RootNamespace> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <CharacterSet>MultiByte</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>MultiByte</CharacterSet> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Emscripten'"> - <PlatformToolset>emcc</PlatformToolset> - <ConfigurationType>HTMLPage</ConfigurationType> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Emscripten'"> - <PlatformToolset>emcc</PlatformToolset> - <ConfigurationType>HTMLPage</ConfigurationType> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Emscripten'"> - <IntDir>$(Platform)\$(ProjectName)_$(Configuration)\</IntDir> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Emscripten'"> - <IntDir>$(Platform)\$(ProjectName)_$(Configuration)\</IntDir> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <Optimization>Disabled</Optimization> - </ClCompile> - <Link> - <GenerateDebugInformation>true</GenerateDebugInformation> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - </ClCompile> - <Link> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Emscripten'"> - <ClCompile> - <AdditionalIncludeDirectories>../glbook/Common</AdditionalIncludeDirectories> - <DisableWarnings>pointer-sign</DisableWarnings> - </ClCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Emscripten'"> - <ClCompile> - <AdditionalIncludeDirectories>../glbook/Common</AdditionalIncludeDirectories> - <DisableWarnings>pointer-sign</DisableWarnings> - </ClCompile> - </ItemDefinitionGroup> - <ItemGroup> - <ClCompile Include="..\glbook\Chapter_15\Hello_Triangle_KD\Hello_Triangle_KD.c" /> - <ClCompile Include="..\glbook\Common\esShader.c" /> - <ClCompile Include="..\glbook\Common\esShapes.c" /> - <ClCompile Include="..\glbook\Common\esTransform.c" /> - <ClCompile Include="..\glbook\Common\esUtil.c" /> - </ItemGroup> - <ItemGroup> - <ClInclude Include="..\glbook\Common\esUtil.h" /> - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project>
\ No newline at end of file diff --git a/tests/msvc10/tests_msvc10.sln b/tests/msvc10/tests_msvc10.sln index e606469b..6f879060 100644 --- a/tests/msvc10/tests_msvc10.sln +++ b/tests/msvc10/tests_msvc10.sln @@ -21,8 +21,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glbook_11_Stencil_Test", "g EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glbook_13_ParticleSystem", "glbook_13_ParticleSystem.vcxproj", "{3E62931D-2795-4BD1-8AA7-55F5440AD293}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glbook_15_Hello_Triangle_KD", "glbook_15_Hello_Triangle_KD.vcxproj", "{A971FFED-3417-452B-B488-6D4F9F257847}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glbook_8_Simple_VertexShader", "glbook_8_Simple_VertexShader.vcxproj", "{2FD5F24F-8B73-4C62-81D6-B6B866E5EC5E}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glbook_9_MipMap2D", "glbook_9_MipMap2D.vcxproj", "{9EB49BEC-C7A0-4AEE-AF19-AACB057DE08B}" @@ -73,207 +71,296 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "twopart", "twopart.vcxproj" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glbook_2_Hello_Triangle", "glbook_2_Hello_Triangle.vcxproj", "{FA655211-CC00-4827-BBCB-B8749BB7671D}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gles", "gles", "{9DCFC12B-65CB-4965-9F16-C63B467E2E9E}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sdl", "sdl", "{70A8D326-5CBD-4C8A-BE84-39B0528C2479}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "other", "other", "{8E55380B-7067-47FF-8B6B-6D656B8D8CC3}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "README", "README", "{AFB0F421-9B24-495D-B961-EA94780F36E5}" - ProjectSection(SolutionItems) = preProject - README.txt = README.txt - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Emscripten = Debug|Emscripten + Debug|Win32 = Debug|Win32 Release|Emscripten = Release|Emscripten + Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {6A41CB2E-0022-47E1-89C5-FB2B558BEB91}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {6A41CB2E-0022-47E1-89C5-FB2B558BEB91}.Debug|Emscripten.Build.0 = Debug|Emscripten + {6A41CB2E-0022-47E1-89C5-FB2B558BEB91}.Debug|Win32.ActiveCfg = Debug|Win32 + {6A41CB2E-0022-47E1-89C5-FB2B558BEB91}.Debug|Win32.Build.0 = Debug|Win32 {6A41CB2E-0022-47E1-89C5-FB2B558BEB91}.Release|Emscripten.ActiveCfg = Release|Emscripten {6A41CB2E-0022-47E1-89C5-FB2B558BEB91}.Release|Emscripten.Build.0 = Release|Emscripten + {6A41CB2E-0022-47E1-89C5-FB2B558BEB91}.Release|Win32.ActiveCfg = Release|Win32 + {6A41CB2E-0022-47E1-89C5-FB2B558BEB91}.Release|Win32.Build.0 = Release|Win32 {C29BBEE3-02D1-459A-B8BA-832A3439F12D}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {C29BBEE3-02D1-459A-B8BA-832A3439F12D}.Debug|Emscripten.Build.0 = Debug|Emscripten + {C29BBEE3-02D1-459A-B8BA-832A3439F12D}.Debug|Win32.ActiveCfg = Debug|Win32 + {C29BBEE3-02D1-459A-B8BA-832A3439F12D}.Debug|Win32.Build.0 = Debug|Win32 {C29BBEE3-02D1-459A-B8BA-832A3439F12D}.Release|Emscripten.ActiveCfg = Release|Emscripten {C29BBEE3-02D1-459A-B8BA-832A3439F12D}.Release|Emscripten.Build.0 = Release|Emscripten + {C29BBEE3-02D1-459A-B8BA-832A3439F12D}.Release|Win32.ActiveCfg = Release|Win32 + {C29BBEE3-02D1-459A-B8BA-832A3439F12D}.Release|Win32.Build.0 = Release|Win32 {DDB7FF8E-EC42-4406-832C-F2B043D8760E}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {DDB7FF8E-EC42-4406-832C-F2B043D8760E}.Debug|Emscripten.Build.0 = Debug|Emscripten + {DDB7FF8E-EC42-4406-832C-F2B043D8760E}.Debug|Win32.ActiveCfg = Debug|Win32 + {DDB7FF8E-EC42-4406-832C-F2B043D8760E}.Debug|Win32.Build.0 = Debug|Win32 {DDB7FF8E-EC42-4406-832C-F2B043D8760E}.Release|Emscripten.ActiveCfg = Release|Emscripten {DDB7FF8E-EC42-4406-832C-F2B043D8760E}.Release|Emscripten.Build.0 = Release|Emscripten + {DDB7FF8E-EC42-4406-832C-F2B043D8760E}.Release|Win32.ActiveCfg = Release|Win32 + {DDB7FF8E-EC42-4406-832C-F2B043D8760E}.Release|Win32.Build.0 = Release|Win32 {A7C445F9-FCE6-48D5-9343-734071A59185}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {A7C445F9-FCE6-48D5-9343-734071A59185}.Debug|Emscripten.Build.0 = Debug|Emscripten + {A7C445F9-FCE6-48D5-9343-734071A59185}.Debug|Win32.ActiveCfg = Debug|Win32 + {A7C445F9-FCE6-48D5-9343-734071A59185}.Debug|Win32.Build.0 = Debug|Win32 {A7C445F9-FCE6-48D5-9343-734071A59185}.Release|Emscripten.ActiveCfg = Release|Emscripten {A7C445F9-FCE6-48D5-9343-734071A59185}.Release|Emscripten.Build.0 = Release|Emscripten + {A7C445F9-FCE6-48D5-9343-734071A59185}.Release|Win32.ActiveCfg = Release|Win32 + {A7C445F9-FCE6-48D5-9343-734071A59185}.Release|Win32.Build.0 = Release|Win32 {C5500D5B-9489-4109-A6E4-CF8F7E1518E7}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {C5500D5B-9489-4109-A6E4-CF8F7E1518E7}.Debug|Emscripten.Build.0 = Debug|Emscripten + {C5500D5B-9489-4109-A6E4-CF8F7E1518E7}.Debug|Win32.ActiveCfg = Debug|Win32 + {C5500D5B-9489-4109-A6E4-CF8F7E1518E7}.Debug|Win32.Build.0 = Debug|Win32 {C5500D5B-9489-4109-A6E4-CF8F7E1518E7}.Release|Emscripten.ActiveCfg = Release|Emscripten {C5500D5B-9489-4109-A6E4-CF8F7E1518E7}.Release|Emscripten.Build.0 = Release|Emscripten + {C5500D5B-9489-4109-A6E4-CF8F7E1518E7}.Release|Win32.ActiveCfg = Release|Win32 + {C5500D5B-9489-4109-A6E4-CF8F7E1518E7}.Release|Win32.Build.0 = Release|Win32 {982D6A44-9080-4A89-911E-BC1E495267D1}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {982D6A44-9080-4A89-911E-BC1E495267D1}.Debug|Emscripten.Build.0 = Debug|Emscripten + {982D6A44-9080-4A89-911E-BC1E495267D1}.Debug|Win32.ActiveCfg = Debug|Win32 + {982D6A44-9080-4A89-911E-BC1E495267D1}.Debug|Win32.Build.0 = Debug|Win32 {982D6A44-9080-4A89-911E-BC1E495267D1}.Release|Emscripten.ActiveCfg = Release|Emscripten {982D6A44-9080-4A89-911E-BC1E495267D1}.Release|Emscripten.Build.0 = Release|Emscripten + {982D6A44-9080-4A89-911E-BC1E495267D1}.Release|Win32.ActiveCfg = Release|Win32 + {982D6A44-9080-4A89-911E-BC1E495267D1}.Release|Win32.Build.0 = Release|Win32 {A2D564BE-34DE-43DC-B8F9-605CEF4BFC4B}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {A2D564BE-34DE-43DC-B8F9-605CEF4BFC4B}.Debug|Emscripten.Build.0 = Debug|Emscripten + {A2D564BE-34DE-43DC-B8F9-605CEF4BFC4B}.Debug|Win32.ActiveCfg = Debug|Win32 + {A2D564BE-34DE-43DC-B8F9-605CEF4BFC4B}.Debug|Win32.Build.0 = Debug|Win32 {A2D564BE-34DE-43DC-B8F9-605CEF4BFC4B}.Release|Emscripten.ActiveCfg = Release|Emscripten {A2D564BE-34DE-43DC-B8F9-605CEF4BFC4B}.Release|Emscripten.Build.0 = Release|Emscripten + {A2D564BE-34DE-43DC-B8F9-605CEF4BFC4B}.Release|Win32.ActiveCfg = Release|Win32 + {A2D564BE-34DE-43DC-B8F9-605CEF4BFC4B}.Release|Win32.Build.0 = Release|Win32 {AD9E59DF-1628-4081-8672-212A7103FAAD}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {AD9E59DF-1628-4081-8672-212A7103FAAD}.Debug|Emscripten.Build.0 = Debug|Emscripten + {AD9E59DF-1628-4081-8672-212A7103FAAD}.Debug|Win32.ActiveCfg = Debug|Win32 + {AD9E59DF-1628-4081-8672-212A7103FAAD}.Debug|Win32.Build.0 = Debug|Win32 {AD9E59DF-1628-4081-8672-212A7103FAAD}.Release|Emscripten.ActiveCfg = Release|Emscripten {AD9E59DF-1628-4081-8672-212A7103FAAD}.Release|Emscripten.Build.0 = Release|Emscripten + {AD9E59DF-1628-4081-8672-212A7103FAAD}.Release|Win32.ActiveCfg = Release|Win32 + {AD9E59DF-1628-4081-8672-212A7103FAAD}.Release|Win32.Build.0 = Release|Win32 {2D60F3E0-B83A-4442-94D3-AB4B2F068476}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {2D60F3E0-B83A-4442-94D3-AB4B2F068476}.Debug|Emscripten.Build.0 = Debug|Emscripten + {2D60F3E0-B83A-4442-94D3-AB4B2F068476}.Debug|Win32.ActiveCfg = Debug|Win32 + {2D60F3E0-B83A-4442-94D3-AB4B2F068476}.Debug|Win32.Build.0 = Debug|Win32 {2D60F3E0-B83A-4442-94D3-AB4B2F068476}.Release|Emscripten.ActiveCfg = Release|Emscripten {2D60F3E0-B83A-4442-94D3-AB4B2F068476}.Release|Emscripten.Build.0 = Release|Emscripten + {2D60F3E0-B83A-4442-94D3-AB4B2F068476}.Release|Win32.ActiveCfg = Release|Win32 + {2D60F3E0-B83A-4442-94D3-AB4B2F068476}.Release|Win32.Build.0 = Release|Win32 {3E62931D-2795-4BD1-8AA7-55F5440AD293}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {3E62931D-2795-4BD1-8AA7-55F5440AD293}.Debug|Emscripten.Build.0 = Debug|Emscripten + {3E62931D-2795-4BD1-8AA7-55F5440AD293}.Debug|Win32.ActiveCfg = Debug|Win32 + {3E62931D-2795-4BD1-8AA7-55F5440AD293}.Debug|Win32.Build.0 = Debug|Win32 {3E62931D-2795-4BD1-8AA7-55F5440AD293}.Release|Emscripten.ActiveCfg = Release|Emscripten {3E62931D-2795-4BD1-8AA7-55F5440AD293}.Release|Emscripten.Build.0 = Release|Emscripten - {A971FFED-3417-452B-B488-6D4F9F257847}.Debug|Emscripten.ActiveCfg = Debug|Emscripten - {A971FFED-3417-452B-B488-6D4F9F257847}.Debug|Emscripten.Build.0 = Debug|Emscripten - {A971FFED-3417-452B-B488-6D4F9F257847}.Release|Emscripten.ActiveCfg = Release|Emscripten - {A971FFED-3417-452B-B488-6D4F9F257847}.Release|Emscripten.Build.0 = Release|Emscripten + {3E62931D-2795-4BD1-8AA7-55F5440AD293}.Release|Win32.ActiveCfg = Release|Win32 + {3E62931D-2795-4BD1-8AA7-55F5440AD293}.Release|Win32.Build.0 = Release|Win32 {2FD5F24F-8B73-4C62-81D6-B6B866E5EC5E}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {2FD5F24F-8B73-4C62-81D6-B6B866E5EC5E}.Debug|Emscripten.Build.0 = Debug|Emscripten + {2FD5F24F-8B73-4C62-81D6-B6B866E5EC5E}.Debug|Win32.ActiveCfg = Debug|Win32 + {2FD5F24F-8B73-4C62-81D6-B6B866E5EC5E}.Debug|Win32.Build.0 = Debug|Win32 {2FD5F24F-8B73-4C62-81D6-B6B866E5EC5E}.Release|Emscripten.ActiveCfg = Release|Emscripten {2FD5F24F-8B73-4C62-81D6-B6B866E5EC5E}.Release|Emscripten.Build.0 = Release|Emscripten + {2FD5F24F-8B73-4C62-81D6-B6B866E5EC5E}.Release|Win32.ActiveCfg = Release|Win32 + {2FD5F24F-8B73-4C62-81D6-B6B866E5EC5E}.Release|Win32.Build.0 = Release|Win32 {9EB49BEC-C7A0-4AEE-AF19-AACB057DE08B}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {9EB49BEC-C7A0-4AEE-AF19-AACB057DE08B}.Debug|Emscripten.Build.0 = Debug|Emscripten + {9EB49BEC-C7A0-4AEE-AF19-AACB057DE08B}.Debug|Win32.ActiveCfg = Debug|Win32 + {9EB49BEC-C7A0-4AEE-AF19-AACB057DE08B}.Debug|Win32.Build.0 = Debug|Win32 {9EB49BEC-C7A0-4AEE-AF19-AACB057DE08B}.Release|Emscripten.ActiveCfg = Release|Emscripten {9EB49BEC-C7A0-4AEE-AF19-AACB057DE08B}.Release|Emscripten.Build.0 = Release|Emscripten + {9EB49BEC-C7A0-4AEE-AF19-AACB057DE08B}.Release|Win32.ActiveCfg = Release|Win32 + {9EB49BEC-C7A0-4AEE-AF19-AACB057DE08B}.Release|Win32.Build.0 = Release|Win32 {2F3AD7E0-AA5D-4639-8F6A-53BDBD88EBD8}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {2F3AD7E0-AA5D-4639-8F6A-53BDBD88EBD8}.Debug|Emscripten.Build.0 = Debug|Emscripten + {2F3AD7E0-AA5D-4639-8F6A-53BDBD88EBD8}.Debug|Win32.ActiveCfg = Debug|Win32 + {2F3AD7E0-AA5D-4639-8F6A-53BDBD88EBD8}.Debug|Win32.Build.0 = Debug|Win32 {2F3AD7E0-AA5D-4639-8F6A-53BDBD88EBD8}.Release|Emscripten.ActiveCfg = Release|Emscripten {2F3AD7E0-AA5D-4639-8F6A-53BDBD88EBD8}.Release|Emscripten.Build.0 = Release|Emscripten + {2F3AD7E0-AA5D-4639-8F6A-53BDBD88EBD8}.Release|Win32.ActiveCfg = Release|Win32 + {2F3AD7E0-AA5D-4639-8F6A-53BDBD88EBD8}.Release|Win32.Build.0 = Release|Win32 {660E83C1-82AC-487C-BF5E-CFB6B82196BC}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {660E83C1-82AC-487C-BF5E-CFB6B82196BC}.Debug|Emscripten.Build.0 = Debug|Emscripten + {660E83C1-82AC-487C-BF5E-CFB6B82196BC}.Debug|Win32.ActiveCfg = Debug|Win32 + {660E83C1-82AC-487C-BF5E-CFB6B82196BC}.Debug|Win32.Build.0 = Debug|Win32 {660E83C1-82AC-487C-BF5E-CFB6B82196BC}.Release|Emscripten.ActiveCfg = Release|Emscripten {660E83C1-82AC-487C-BF5E-CFB6B82196BC}.Release|Emscripten.Build.0 = Release|Emscripten + {660E83C1-82AC-487C-BF5E-CFB6B82196BC}.Release|Win32.ActiveCfg = Release|Win32 + {660E83C1-82AC-487C-BF5E-CFB6B82196BC}.Release|Win32.Build.0 = Release|Win32 {5970CDD4-FB0A-4E66-B7C9-DAD9E580628D}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {5970CDD4-FB0A-4E66-B7C9-DAD9E580628D}.Debug|Emscripten.Build.0 = Debug|Emscripten + {5970CDD4-FB0A-4E66-B7C9-DAD9E580628D}.Debug|Win32.ActiveCfg = Debug|Win32 + {5970CDD4-FB0A-4E66-B7C9-DAD9E580628D}.Debug|Win32.Build.0 = Debug|Win32 {5970CDD4-FB0A-4E66-B7C9-DAD9E580628D}.Release|Emscripten.ActiveCfg = Release|Emscripten {5970CDD4-FB0A-4E66-B7C9-DAD9E580628D}.Release|Emscripten.Build.0 = Release|Emscripten + {5970CDD4-FB0A-4E66-B7C9-DAD9E580628D}.Release|Win32.ActiveCfg = Release|Win32 + {5970CDD4-FB0A-4E66-B7C9-DAD9E580628D}.Release|Win32.Build.0 = Release|Win32 {EB0B52B6-0177-4CEE-955D-3C7F052E5F5B}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {EB0B52B6-0177-4CEE-955D-3C7F052E5F5B}.Debug|Emscripten.Build.0 = Debug|Emscripten + {EB0B52B6-0177-4CEE-955D-3C7F052E5F5B}.Debug|Win32.ActiveCfg = Debug|Win32 + {EB0B52B6-0177-4CEE-955D-3C7F052E5F5B}.Debug|Win32.Build.0 = Debug|Win32 {EB0B52B6-0177-4CEE-955D-3C7F052E5F5B}.Release|Emscripten.ActiveCfg = Release|Emscripten {EB0B52B6-0177-4CEE-955D-3C7F052E5F5B}.Release|Emscripten.Build.0 = Release|Emscripten + {EB0B52B6-0177-4CEE-955D-3C7F052E5F5B}.Release|Win32.ActiveCfg = Release|Win32 + {EB0B52B6-0177-4CEE-955D-3C7F052E5F5B}.Release|Win32.Build.0 = Release|Win32 {DFBD530C-9163-4558-B607-2A226BCC8DC0}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {DFBD530C-9163-4558-B607-2A226BCC8DC0}.Debug|Emscripten.Build.0 = Debug|Emscripten + {DFBD530C-9163-4558-B607-2A226BCC8DC0}.Debug|Win32.ActiveCfg = Debug|Win32 + {DFBD530C-9163-4558-B607-2A226BCC8DC0}.Debug|Win32.Build.0 = Debug|Win32 {DFBD530C-9163-4558-B607-2A226BCC8DC0}.Release|Emscripten.ActiveCfg = Release|Emscripten {DFBD530C-9163-4558-B607-2A226BCC8DC0}.Release|Emscripten.Build.0 = Release|Emscripten + {DFBD530C-9163-4558-B607-2A226BCC8DC0}.Release|Win32.ActiveCfg = Release|Win32 + {DFBD530C-9163-4558-B607-2A226BCC8DC0}.Release|Win32.Build.0 = Release|Win32 {19DB739D-7EEB-4B99-BB6D-C12F086B5F24}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {19DB739D-7EEB-4B99-BB6D-C12F086B5F24}.Debug|Emscripten.Build.0 = Debug|Emscripten + {19DB739D-7EEB-4B99-BB6D-C12F086B5F24}.Debug|Win32.ActiveCfg = Debug|Win32 + {19DB739D-7EEB-4B99-BB6D-C12F086B5F24}.Debug|Win32.Build.0 = Debug|Win32 {19DB739D-7EEB-4B99-BB6D-C12F086B5F24}.Release|Emscripten.ActiveCfg = Release|Emscripten {19DB739D-7EEB-4B99-BB6D-C12F086B5F24}.Release|Emscripten.Build.0 = Release|Emscripten + {19DB739D-7EEB-4B99-BB6D-C12F086B5F24}.Release|Win32.ActiveCfg = Release|Win32 + {19DB739D-7EEB-4B99-BB6D-C12F086B5F24}.Release|Win32.Build.0 = Release|Win32 {DB3B6C01-8CF9-4397-843E-403D5063F2DE}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {DB3B6C01-8CF9-4397-843E-403D5063F2DE}.Debug|Emscripten.Build.0 = Debug|Emscripten + {DB3B6C01-8CF9-4397-843E-403D5063F2DE}.Debug|Win32.ActiveCfg = Debug|Win32 + {DB3B6C01-8CF9-4397-843E-403D5063F2DE}.Debug|Win32.Build.0 = Debug|Win32 {DB3B6C01-8CF9-4397-843E-403D5063F2DE}.Release|Emscripten.ActiveCfg = Release|Emscripten {DB3B6C01-8CF9-4397-843E-403D5063F2DE}.Release|Emscripten.Build.0 = Release|Emscripten + {DB3B6C01-8CF9-4397-843E-403D5063F2DE}.Release|Win32.ActiveCfg = Release|Win32 + {DB3B6C01-8CF9-4397-843E-403D5063F2DE}.Release|Win32.Build.0 = Release|Win32 {5C72F8EA-B852-49F6-A979-DE5011957BC7}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {5C72F8EA-B852-49F6-A979-DE5011957BC7}.Debug|Emscripten.Build.0 = Debug|Emscripten + {5C72F8EA-B852-49F6-A979-DE5011957BC7}.Debug|Win32.ActiveCfg = Debug|Win32 + {5C72F8EA-B852-49F6-A979-DE5011957BC7}.Debug|Win32.Build.0 = Debug|Win32 {5C72F8EA-B852-49F6-A979-DE5011957BC7}.Release|Emscripten.ActiveCfg = Release|Emscripten {5C72F8EA-B852-49F6-A979-DE5011957BC7}.Release|Emscripten.Build.0 = Release|Emscripten + {5C72F8EA-B852-49F6-A979-DE5011957BC7}.Release|Win32.ActiveCfg = Release|Win32 + {5C72F8EA-B852-49F6-A979-DE5011957BC7}.Release|Win32.Build.0 = Release|Win32 {DA2F2979-2902-42BC-B8DA-6B18FE2AF444}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {DA2F2979-2902-42BC-B8DA-6B18FE2AF444}.Debug|Emscripten.Build.0 = Debug|Emscripten + {DA2F2979-2902-42BC-B8DA-6B18FE2AF444}.Debug|Win32.ActiveCfg = Debug|Win32 + {DA2F2979-2902-42BC-B8DA-6B18FE2AF444}.Debug|Win32.Build.0 = Debug|Win32 {DA2F2979-2902-42BC-B8DA-6B18FE2AF444}.Release|Emscripten.ActiveCfg = Release|Emscripten {DA2F2979-2902-42BC-B8DA-6B18FE2AF444}.Release|Emscripten.Build.0 = Release|Emscripten + {DA2F2979-2902-42BC-B8DA-6B18FE2AF444}.Release|Win32.ActiveCfg = Release|Win32 + {DA2F2979-2902-42BC-B8DA-6B18FE2AF444}.Release|Win32.Build.0 = Release|Win32 {A44C4C27-F173-47D0-8626-59A21D86AC1E}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {A44C4C27-F173-47D0-8626-59A21D86AC1E}.Debug|Emscripten.Build.0 = Debug|Emscripten + {A44C4C27-F173-47D0-8626-59A21D86AC1E}.Debug|Win32.ActiveCfg = Debug|Win32 + {A44C4C27-F173-47D0-8626-59A21D86AC1E}.Debug|Win32.Build.0 = Debug|Win32 {A44C4C27-F173-47D0-8626-59A21D86AC1E}.Release|Emscripten.ActiveCfg = Release|Emscripten {A44C4C27-F173-47D0-8626-59A21D86AC1E}.Release|Emscripten.Build.0 = Release|Emscripten + {A44C4C27-F173-47D0-8626-59A21D86AC1E}.Release|Win32.ActiveCfg = Release|Win32 + {A44C4C27-F173-47D0-8626-59A21D86AC1E}.Release|Win32.Build.0 = Release|Win32 {65E0ED61-A813-4AEB-8DB0-A58657858EE2}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {65E0ED61-A813-4AEB-8DB0-A58657858EE2}.Debug|Emscripten.Build.0 = Debug|Emscripten + {65E0ED61-A813-4AEB-8DB0-A58657858EE2}.Debug|Win32.ActiveCfg = Debug|Win32 + {65E0ED61-A813-4AEB-8DB0-A58657858EE2}.Debug|Win32.Build.0 = Debug|Win32 {65E0ED61-A813-4AEB-8DB0-A58657858EE2}.Release|Emscripten.ActiveCfg = Release|Emscripten {65E0ED61-A813-4AEB-8DB0-A58657858EE2}.Release|Emscripten.Build.0 = Release|Emscripten + {65E0ED61-A813-4AEB-8DB0-A58657858EE2}.Release|Win32.ActiveCfg = Release|Win32 + {65E0ED61-A813-4AEB-8DB0-A58657858EE2}.Release|Win32.Build.0 = Release|Win32 {BE6A123E-9729-44A3-976F-3C06A3724894}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {BE6A123E-9729-44A3-976F-3C06A3724894}.Debug|Emscripten.Build.0 = Debug|Emscripten + {BE6A123E-9729-44A3-976F-3C06A3724894}.Debug|Win32.ActiveCfg = Debug|Win32 + {BE6A123E-9729-44A3-976F-3C06A3724894}.Debug|Win32.Build.0 = Debug|Win32 {BE6A123E-9729-44A3-976F-3C06A3724894}.Release|Emscripten.ActiveCfg = Release|Emscripten {BE6A123E-9729-44A3-976F-3C06A3724894}.Release|Emscripten.Build.0 = Release|Emscripten + {BE6A123E-9729-44A3-976F-3C06A3724894}.Release|Win32.ActiveCfg = Release|Win32 + {BE6A123E-9729-44A3-976F-3C06A3724894}.Release|Win32.Build.0 = Release|Win32 {61D7F11F-25EE-4C2C-9D73-8601F68B055E}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {61D7F11F-25EE-4C2C-9D73-8601F68B055E}.Debug|Emscripten.Build.0 = Debug|Emscripten + {61D7F11F-25EE-4C2C-9D73-8601F68B055E}.Debug|Win32.ActiveCfg = Debug|Win32 + {61D7F11F-25EE-4C2C-9D73-8601F68B055E}.Debug|Win32.Build.0 = Debug|Win32 {61D7F11F-25EE-4C2C-9D73-8601F68B055E}.Release|Emscripten.ActiveCfg = Release|Emscripten {61D7F11F-25EE-4C2C-9D73-8601F68B055E}.Release|Emscripten.Build.0 = Release|Emscripten + {61D7F11F-25EE-4C2C-9D73-8601F68B055E}.Release|Win32.ActiveCfg = Release|Win32 + {61D7F11F-25EE-4C2C-9D73-8601F68B055E}.Release|Win32.Build.0 = Release|Win32 {F28A1DE1-5949-4AF5-8901-A37871C2514E}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {F28A1DE1-5949-4AF5-8901-A37871C2514E}.Debug|Emscripten.Build.0 = Debug|Emscripten + {F28A1DE1-5949-4AF5-8901-A37871C2514E}.Debug|Win32.ActiveCfg = Debug|Win32 + {F28A1DE1-5949-4AF5-8901-A37871C2514E}.Debug|Win32.Build.0 = Debug|Win32 {F28A1DE1-5949-4AF5-8901-A37871C2514E}.Release|Emscripten.ActiveCfg = Release|Emscripten {F28A1DE1-5949-4AF5-8901-A37871C2514E}.Release|Emscripten.Build.0 = Release|Emscripten + {F28A1DE1-5949-4AF5-8901-A37871C2514E}.Release|Win32.ActiveCfg = Release|Win32 + {F28A1DE1-5949-4AF5-8901-A37871C2514E}.Release|Win32.Build.0 = Release|Win32 {CE360D01-4362-4FE4-A77E-8EF6E3F623CF}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {CE360D01-4362-4FE4-A77E-8EF6E3F623CF}.Debug|Emscripten.Build.0 = Debug|Emscripten + {CE360D01-4362-4FE4-A77E-8EF6E3F623CF}.Debug|Win32.ActiveCfg = Debug|Win32 + {CE360D01-4362-4FE4-A77E-8EF6E3F623CF}.Debug|Win32.Build.0 = Debug|Win32 {CE360D01-4362-4FE4-A77E-8EF6E3F623CF}.Release|Emscripten.ActiveCfg = Release|Emscripten {CE360D01-4362-4FE4-A77E-8EF6E3F623CF}.Release|Emscripten.Build.0 = Release|Emscripten + {CE360D01-4362-4FE4-A77E-8EF6E3F623CF}.Release|Win32.ActiveCfg = Release|Win32 + {CE360D01-4362-4FE4-A77E-8EF6E3F623CF}.Release|Win32.Build.0 = Release|Win32 {3EA4E5F5-67B6-4F83-95D7-E041FFF787B0}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {3EA4E5F5-67B6-4F83-95D7-E041FFF787B0}.Debug|Emscripten.Build.0 = Debug|Emscripten + {3EA4E5F5-67B6-4F83-95D7-E041FFF787B0}.Debug|Win32.ActiveCfg = Debug|Win32 + {3EA4E5F5-67B6-4F83-95D7-E041FFF787B0}.Debug|Win32.Build.0 = Debug|Win32 {3EA4E5F5-67B6-4F83-95D7-E041FFF787B0}.Release|Emscripten.ActiveCfg = Release|Emscripten {3EA4E5F5-67B6-4F83-95D7-E041FFF787B0}.Release|Emscripten.Build.0 = Release|Emscripten + {3EA4E5F5-67B6-4F83-95D7-E041FFF787B0}.Release|Win32.ActiveCfg = Release|Win32 + {3EA4E5F5-67B6-4F83-95D7-E041FFF787B0}.Release|Win32.Build.0 = Release|Win32 {5CE874BD-2F32-4579-B682-4B74E5764F13}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {5CE874BD-2F32-4579-B682-4B74E5764F13}.Debug|Emscripten.Build.0 = Debug|Emscripten + {5CE874BD-2F32-4579-B682-4B74E5764F13}.Debug|Win32.ActiveCfg = Debug|Win32 + {5CE874BD-2F32-4579-B682-4B74E5764F13}.Debug|Win32.Build.0 = Debug|Win32 {5CE874BD-2F32-4579-B682-4B74E5764F13}.Release|Emscripten.ActiveCfg = Release|Emscripten {5CE874BD-2F32-4579-B682-4B74E5764F13}.Release|Emscripten.Build.0 = Release|Emscripten + {5CE874BD-2F32-4579-B682-4B74E5764F13}.Release|Win32.ActiveCfg = Release|Win32 + {5CE874BD-2F32-4579-B682-4B74E5764F13}.Release|Win32.Build.0 = Release|Win32 {1C5338A3-7020-4086-AE99-BC79EA3D42C1}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {1C5338A3-7020-4086-AE99-BC79EA3D42C1}.Debug|Emscripten.Build.0 = Debug|Emscripten + {1C5338A3-7020-4086-AE99-BC79EA3D42C1}.Debug|Win32.ActiveCfg = Debug|Win32 + {1C5338A3-7020-4086-AE99-BC79EA3D42C1}.Debug|Win32.Build.0 = Debug|Win32 {1C5338A3-7020-4086-AE99-BC79EA3D42C1}.Release|Emscripten.ActiveCfg = Release|Emscripten {1C5338A3-7020-4086-AE99-BC79EA3D42C1}.Release|Emscripten.Build.0 = Release|Emscripten + {1C5338A3-7020-4086-AE99-BC79EA3D42C1}.Release|Win32.ActiveCfg = Release|Win32 + {1C5338A3-7020-4086-AE99-BC79EA3D42C1}.Release|Win32.Build.0 = Release|Win32 {D3295E36-57BB-4C42-92D8-2AA150024256}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {D3295E36-57BB-4C42-92D8-2AA150024256}.Debug|Emscripten.Build.0 = Debug|Emscripten + {D3295E36-57BB-4C42-92D8-2AA150024256}.Debug|Win32.ActiveCfg = Debug|Win32 + {D3295E36-57BB-4C42-92D8-2AA150024256}.Debug|Win32.Build.0 = Debug|Win32 {D3295E36-57BB-4C42-92D8-2AA150024256}.Release|Emscripten.ActiveCfg = Release|Emscripten {D3295E36-57BB-4C42-92D8-2AA150024256}.Release|Emscripten.Build.0 = Release|Emscripten + {D3295E36-57BB-4C42-92D8-2AA150024256}.Release|Win32.ActiveCfg = Release|Win32 + {D3295E36-57BB-4C42-92D8-2AA150024256}.Release|Win32.Build.0 = Release|Win32 {670EA36B-AD2B-4BFC-8DD3-AE024736AFB2}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {670EA36B-AD2B-4BFC-8DD3-AE024736AFB2}.Debug|Emscripten.Build.0 = Debug|Emscripten + {670EA36B-AD2B-4BFC-8DD3-AE024736AFB2}.Debug|Win32.ActiveCfg = Debug|Win32 + {670EA36B-AD2B-4BFC-8DD3-AE024736AFB2}.Debug|Win32.Build.0 = Debug|Win32 {670EA36B-AD2B-4BFC-8DD3-AE024736AFB2}.Release|Emscripten.ActiveCfg = Release|Emscripten {670EA36B-AD2B-4BFC-8DD3-AE024736AFB2}.Release|Emscripten.Build.0 = Release|Emscripten + {670EA36B-AD2B-4BFC-8DD3-AE024736AFB2}.Release|Win32.ActiveCfg = Release|Win32 + {670EA36B-AD2B-4BFC-8DD3-AE024736AFB2}.Release|Win32.Build.0 = Release|Win32 {678A07B3-3A25-40E4-8A36-7A399056188A}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {678A07B3-3A25-40E4-8A36-7A399056188A}.Debug|Emscripten.Build.0 = Debug|Emscripten + {678A07B3-3A25-40E4-8A36-7A399056188A}.Debug|Win32.ActiveCfg = Debug|Win32 + {678A07B3-3A25-40E4-8A36-7A399056188A}.Debug|Win32.Build.0 = Debug|Win32 {678A07B3-3A25-40E4-8A36-7A399056188A}.Release|Emscripten.ActiveCfg = Release|Emscripten {678A07B3-3A25-40E4-8A36-7A399056188A}.Release|Emscripten.Build.0 = Release|Emscripten + {678A07B3-3A25-40E4-8A36-7A399056188A}.Release|Win32.ActiveCfg = Release|Win32 + {678A07B3-3A25-40E4-8A36-7A399056188A}.Release|Win32.Build.0 = Release|Win32 {C896D890-9132-4A2D-8BA8-0EB6888FEAC2}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {C896D890-9132-4A2D-8BA8-0EB6888FEAC2}.Debug|Emscripten.Build.0 = Debug|Emscripten + {C896D890-9132-4A2D-8BA8-0EB6888FEAC2}.Debug|Win32.ActiveCfg = Debug|Win32 + {C896D890-9132-4A2D-8BA8-0EB6888FEAC2}.Debug|Win32.Build.0 = Debug|Win32 {C896D890-9132-4A2D-8BA8-0EB6888FEAC2}.Release|Emscripten.ActiveCfg = Release|Emscripten {C896D890-9132-4A2D-8BA8-0EB6888FEAC2}.Release|Emscripten.Build.0 = Release|Emscripten + {C896D890-9132-4A2D-8BA8-0EB6888FEAC2}.Release|Win32.ActiveCfg = Release|Win32 + {C896D890-9132-4A2D-8BA8-0EB6888FEAC2}.Release|Win32.Build.0 = Release|Win32 {FA655211-CC00-4827-BBCB-B8749BB7671D}.Debug|Emscripten.ActiveCfg = Debug|Emscripten {FA655211-CC00-4827-BBCB-B8749BB7671D}.Debug|Emscripten.Build.0 = Debug|Emscripten + {FA655211-CC00-4827-BBCB-B8749BB7671D}.Debug|Win32.ActiveCfg = Debug|Win32 + {FA655211-CC00-4827-BBCB-B8749BB7671D}.Debug|Win32.Build.0 = Debug|Win32 {FA655211-CC00-4827-BBCB-B8749BB7671D}.Release|Emscripten.ActiveCfg = Release|Emscripten {FA655211-CC00-4827-BBCB-B8749BB7671D}.Release|Emscripten.Build.0 = Release|Emscripten + {FA655211-CC00-4827-BBCB-B8749BB7671D}.Release|Win32.ActiveCfg = Release|Win32 + {FA655211-CC00-4827-BBCB-B8749BB7671D}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {A7C445F9-FCE6-48D5-9343-734071A59185} = {9DCFC12B-65CB-4965-9F16-C63B467E2E9E} - {C5500D5B-9489-4109-A6E4-CF8F7E1518E7} = {9DCFC12B-65CB-4965-9F16-C63B467E2E9E} - {982D6A44-9080-4A89-911E-BC1E495267D1} = {9DCFC12B-65CB-4965-9F16-C63B467E2E9E} - {A2D564BE-34DE-43DC-B8F9-605CEF4BFC4B} = {9DCFC12B-65CB-4965-9F16-C63B467E2E9E} - {AD9E59DF-1628-4081-8672-212A7103FAAD} = {9DCFC12B-65CB-4965-9F16-C63B467E2E9E} - {2D60F3E0-B83A-4442-94D3-AB4B2F068476} = {9DCFC12B-65CB-4965-9F16-C63B467E2E9E} - {3E62931D-2795-4BD1-8AA7-55F5440AD293} = {9DCFC12B-65CB-4965-9F16-C63B467E2E9E} - {A971FFED-3417-452B-B488-6D4F9F257847} = {9DCFC12B-65CB-4965-9F16-C63B467E2E9E} - {2FD5F24F-8B73-4C62-81D6-B6B866E5EC5E} = {9DCFC12B-65CB-4965-9F16-C63B467E2E9E} - {9EB49BEC-C7A0-4AEE-AF19-AACB057DE08B} = {9DCFC12B-65CB-4965-9F16-C63B467E2E9E} - {FA655211-CC00-4827-BBCB-B8749BB7671D} = {9DCFC12B-65CB-4965-9F16-C63B467E2E9E} - {6A41CB2E-0022-47E1-89C5-FB2B558BEB91} = {9DCFC12B-65CB-4965-9F16-C63B467E2E9E} - {DDB7FF8E-EC42-4406-832C-F2B043D8760E} = {8E55380B-7067-47FF-8B6B-6D656B8D8CC3} - {2F3AD7E0-AA5D-4639-8F6A-53BDBD88EBD8} = {8E55380B-7067-47FF-8B6B-6D656B8D8CC3} - {660E83C1-82AC-487C-BF5E-CFB6B82196BC} = {8E55380B-7067-47FF-8B6B-6D656B8D8CC3} - {5970CDD4-FB0A-4E66-B7C9-DAD9E580628D} = {8E55380B-7067-47FF-8B6B-6D656B8D8CC3} - {EB0B52B6-0177-4CEE-955D-3C7F052E5F5B} = {8E55380B-7067-47FF-8B6B-6D656B8D8CC3} - {DFBD530C-9163-4558-B607-2A226BCC8DC0} = {8E55380B-7067-47FF-8B6B-6D656B8D8CC3} - {19DB739D-7EEB-4B99-BB6D-C12F086B5F24} = {8E55380B-7067-47FF-8B6B-6D656B8D8CC3} - {DB3B6C01-8CF9-4397-843E-403D5063F2DE} = {8E55380B-7067-47FF-8B6B-6D656B8D8CC3} - {5C72F8EA-B852-49F6-A979-DE5011957BC7} = {8E55380B-7067-47FF-8B6B-6D656B8D8CC3} - {A44C4C27-F173-47D0-8626-59A21D86AC1E} = {8E55380B-7067-47FF-8B6B-6D656B8D8CC3} - {65E0ED61-A813-4AEB-8DB0-A58657858EE2} = {8E55380B-7067-47FF-8B6B-6D656B8D8CC3} - {BE6A123E-9729-44A3-976F-3C06A3724894} = {8E55380B-7067-47FF-8B6B-6D656B8D8CC3} - {61D7F11F-25EE-4C2C-9D73-8601F68B055E} = {8E55380B-7067-47FF-8B6B-6D656B8D8CC3} - {678A07B3-3A25-40E4-8A36-7A399056188A} = {8E55380B-7067-47FF-8B6B-6D656B8D8CC3} - {C896D890-9132-4A2D-8BA8-0EB6888FEAC2} = {8E55380B-7067-47FF-8B6B-6D656B8D8CC3} - {C29BBEE3-02D1-459A-B8BA-832A3439F12D} = {8E55380B-7067-47FF-8B6B-6D656B8D8CC3} - {F28A1DE1-5949-4AF5-8901-A37871C2514E} = {70A8D326-5CBD-4C8A-BE84-39B0528C2479} - {CE360D01-4362-4FE4-A77E-8EF6E3F623CF} = {70A8D326-5CBD-4C8A-BE84-39B0528C2479} - {3EA4E5F5-67B6-4F83-95D7-E041FFF787B0} = {70A8D326-5CBD-4C8A-BE84-39B0528C2479} - {5CE874BD-2F32-4579-B682-4B74E5764F13} = {70A8D326-5CBD-4C8A-BE84-39B0528C2479} - {1C5338A3-7020-4086-AE99-BC79EA3D42C1} = {70A8D326-5CBD-4C8A-BE84-39B0528C2479} - {D3295E36-57BB-4C42-92D8-2AA150024256} = {70A8D326-5CBD-4C8A-BE84-39B0528C2479} - {670EA36B-AD2B-4BFC-8DD3-AE024736AFB2} = {70A8D326-5CBD-4C8A-BE84-39B0528C2479} - {DA2F2979-2902-42BC-B8DA-6B18FE2AF444} = {70A8D326-5CBD-4C8A-BE84-39B0528C2479} - EndGlobalSection EndGlobal diff --git a/tests/runner.py b/tests/runner.py index 8747c340..ddc97ea4 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -646,7 +646,7 @@ class BrowserCore(RunnerCore): }); ''' % basename) - def btest(self, filename, expected=None, reference=None, force_c=False, reference_slack=0, + def btest(self, filename, expected=None, reference=None, force_c=False, reference_slack=0, manual_reference=False, post_build=None, args=[], outfile='test.html', message='.'): # TODO: use in all other tests # if we are provided the source and not a path, use that filename_is_src = '\n' in filename @@ -663,9 +663,11 @@ class BrowserCore(RunnerCore): expected = [str(i) for i in range(0, reference_slack+1)] shutil.copyfile(filepath, temp_filepath) self.reftest(path_from_root('tests', reference)) - args = args + ['--pre-js', 'reftest.js', '-s', 'GL_TESTING=1'] + if not manual_reference: + args = args + ['--pre-js', 'reftest.js', '-s', 'GL_TESTING=1'] Popen([PYTHON, EMCC, temp_filepath, '-o', outfile] + args).communicate() assert os.path.exists(outfile) + if post_build: post_build() if type(expected) is str: expected = [expected] self.run_browser(outfile, message, ['/report_result?' + e for e in expected]) diff --git a/tests/sdl_canvas_proxy.c b/tests/sdl_canvas_proxy.c new file mode 100644 index 00000000..27ef3bb4 --- /dev/null +++ b/tests/sdl_canvas_proxy.c @@ -0,0 +1,34 @@ +#include <stdio.h> +#include <stdlib.h> +#include <SDL/SDL.h> +#include <assert.h> +#include <emscripten.h> + +int main(int argc, char **argv) { + FILE *f = fopen("data.txt", "rb"); + assert(f); + assert(fgetc(f) == 'd'); + assert(fgetc(f) == 'a'); + assert(fgetc(f) == 't'); + assert(fgetc(f) == 'u'); + assert(fgetc(f) == 'm'); + fclose(f); + + SDL_Init(SDL_INIT_VIDEO); + SDL_Surface *screen = SDL_SetVideoMode(600, 450, 32, SDL_HWSURFACE); + + SDL_LockSurface(screen); + unsigned int *pixels = (unsigned int *)screen->pixels; + for (int x = 0; x < screen->w; x++) { + for (int y = 0; y < screen->h; y++) { + pixels[x + y*screen->h] = x < 300 ? (y < 200 ? 0x3377AA88 : 0xAA3377CC) : (y < 200 ? 0x0066AA77 : 0xAA006699); + } + } + SDL_UnlockSurface(screen); + + SDL_Quit(); + + EM_ASM(window.close()); + return 0; +} + diff --git a/tests/sdl_canvas_proxy.png b/tests/sdl_canvas_proxy.png Binary files differnew file mode 100644 index 00000000..cc96acfd --- /dev/null +++ b/tests/sdl_canvas_proxy.png diff --git a/tests/sdl_key_proxy.c b/tests/sdl_key_proxy.c new file mode 100644 index 00000000..bc233f29 --- /dev/null +++ b/tests/sdl_key_proxy.c @@ -0,0 +1,63 @@ +#include <stdio.h> +#include <SDL/SDL.h> +#include <SDL/SDL_ttf.h> +#include <emscripten.h> + +int result = 1; + +void one() { + SDL_Event event; + while (SDL_PollEvent(&event)) { + printf("got event %d\n", event.type); + switch(event.type) { + case SDL_KEYDOWN: + break; + case SDL_KEYUP: + // don't handle the modifier key events + if (event.key.keysym.sym == SDLK_LCTRL || + event.key.keysym.sym == SDLK_LSHIFT || + event.key.keysym.sym == SDLK_LALT) { + return; + } + if ((event.key.keysym.mod & KMOD_LCTRL) || (event.key.keysym.mod & KMOD_RCTRL)) { + result *= 2; + } + if ((event.key.keysym.mod & KMOD_LSHIFT) || (event.key.keysym.mod & KMOD_RSHIFT)) { + result *= 3; + } + if ((event.key.keysym.mod & KMOD_LALT) || (event.key.keysym.mod & KMOD_RALT)) { + result *= 5; + } + switch (event.key.keysym.sym) { + case SDLK_RIGHT: printf("right\n"); result *= 7; break; + case SDLK_LEFT: printf("left\n"); result *= 11; break; + case SDLK_DOWN: printf("down\n"); result *= 13; break; + case SDLK_UP: printf("up\n"); result *= 17; break; + case SDLK_a: printf("a\n"); result *= 19; break; + default: { + if (event.key.keysym.scancode == SDL_SCANCODE_B) { + printf("b scancode\n"); result *= 23; break; + } + printf("unknown key: sym %d scancode %d\n", event.key.keysym.sym, event.key.keysym.scancode); + REPORT_RESULT(); + emscripten_run_script("throw 'done'"); // comment this out to leave event handling active. Use the following to log DOM keys: + // addEventListener('keyup', function(event) { console.log(event.keyCode) }, true) + } + } + break; + default: /* Report an unhandled event */ + printf("I don't know what this event is!\n"); + } + } +} + +int main(int argc, char **argv) { + printf("main\n"); + SDL_Init(SDL_INIT_VIDEO); + SDL_Surface *screen = SDL_SetVideoMode(600, 450, 32, SDL_HWSURFACE); + + if (argc == 1337) one(); // keep it alive + + return 0; +} + diff --git a/tests/test_browser.py b/tests/test_browser.py index 3ac640f1..e6fd6544 100644 --- a/tests/test_browser.py +++ b/tests/test_browser.py @@ -627,6 +627,28 @@ If manually bisecting: Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'sdl_canvas.c'), '-o', 'page.html', '-s', 'LEGACY_GL_EMULATION=1']).communicate() self.run_browser('page.html', '', '/report_result?1') + def test_sdl_canvas_proxy(self): + def post(): + html = open('test.html').read() + html = html.replace('</body>', ''' +<script> +function assert(x, y) { if (!x) throw 'assertion failed ' + y } + +%s + +var windowClose = window.close; +window.close = function() { + doReftest(); + setTimeout(windowClose, 1000); +}; +</script> +</body>''' % open('reftest.js').read()) + open('test.html', 'w').write(html) + + open('data.txt', 'w').write('datum') + + self.btest('sdl_canvas_proxy.c', reference='sdl_canvas_proxy.png', args=['--proxy-to-worker', '--preload-file', 'data.txt'], manual_reference=True, post_build=post) + def test_sdl_key(self): open(os.path.join(self.get_dir(), 'pre.js'), 'w').write(''' Module.postRun = function() { @@ -658,6 +680,52 @@ If manually bisecting: Popen([PYTHON, EMCC, os.path.join(self.get_dir(), 'sdl_key.c'), '-o', 'page.html', '--pre-js', 'pre.js', '-s', '''EXPORTED_FUNCTIONS=['_main', '_one']''']).communicate() self.run_browser('page.html', '', '/report_result?223092870') + def test_sdl_key_proxy(self): + open(os.path.join(self.get_dir(), 'pre.js'), 'w').write(''' + var Module = {}; + Module.postRun = function() { + function doOne() { + Module._one(); + setTimeout(doOne, 1000/60); + } + setTimeout(doOne, 1000/60); + } + ''') + + def post(): + html = open('test.html').read() + html = html.replace('</body>', ''' +<script> +function keydown(c) { + var event = document.createEvent("KeyboardEvent"); + event.initKeyEvent("keydown", true, true, window, + 0, 0, 0, 0, + c, c); + document.dispatchEvent(event); +} + +function keyup(c) { + var event = document.createEvent("KeyboardEvent"); + event.initKeyEvent("keyup", true, true, window, + 0, 0, 0, 0, + c, c); + document.dispatchEvent(event); +} + +keydown(1250);keydown(38);keyup(38);keyup(1250); // alt, up +keydown(1248);keydown(1249);keydown(40);keyup(40);keyup(1249);keyup(1248); // ctrl, shift, down +keydown(37);keyup(37); // left +keydown(39);keyup(39); // right +keydown(65);keyup(65); // a +keydown(66);keyup(66); // b +keydown(100);keyup(100); // trigger the end + +</script> +</body>''') + open('test.html', 'w').write(html) + + self.btest('sdl_key_proxy.c', '223092870', args=['--proxy-to-worker', '--pre-js', 'pre.js', '-s', '''EXPORTED_FUNCTIONS=['_main', '_one']'''], manual_reference=True, post_build=post) + def test_sdl_text(self): open(os.path.join(self.get_dir(), 'pre.js'), 'w').write(''' Module.postRun = function() { diff --git a/tests/test_core.py b/tests/test_core.py index 5d4f35e8..d02e6778 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -3756,11 +3756,18 @@ def process(filename): int main() { asm("Module.print('Inline JS is very cool')"); printf("%.2f\n", get()); + + // Test that passing multiple input and output variables works. + int src1 = 1, src2 = 2, src3 = 3; + int dst1 = 0, dst2 = 0, dst3 = 0; + // TODO asm("Module.print(%3); Module.print(%4); Module.print(%5); %0 = %3; %1 = %4; %2 = %5;" : "=r"(dst1),"=r"(dst2),"=r"(dst3): "r"(src1),"r"(src2),"r"(src3)); + // TODO printf("%d\n%d\n%d\n", dst1, dst2, dst3); + return 0; } ''' - self.do_run(src, 'Inline JS is very cool\n3.64\n') + self.do_run(src, 'Inline JS is very cool\n3.64\n') # TODO 1\n2\n3\n1\n2\n3\n') def test_inlinejs2(self): if Settings.ASM_JS: Settings.ASM_JS = 2 # skip validation, asm does not support random code @@ -5432,6 +5439,34 @@ The current type of b is: 9 ''' self.do_run(src, 'memmove can be very useful....!') + def test_flexarray_struct(self): + src = r''' +#include <stdint.h> +#include <stdlib.h> +#include <stdio.h> + +typedef struct +{ + uint16_t length; + struct + { + int32_t int32; + } value[]; +} Tuple; + +int main() { + Tuple T[10]; + Tuple *t = &T[0]; + + t->length = 4; + t->value->int32 = 100; + + printf("(%d, %d)\n", t->length, t->value->int32); + return 0; +} +''' + self.do_run(src, '(4, 100)') + def test_bsearch(self): if Settings.QUANTUM_SIZE == 1: return self.skip('Test cannot work with q1') @@ -7525,6 +7560,12 @@ def process(filename): ''' self.do_run(src, '206 188 226 128 μ†ℱ ╋ℯ╳╋ 😇\nμ†ℱ ╋ℯ╳╋ 😇,206,188,226,128\n'); + def test_utf32(self): + if self.emcc_args is None: return self.skip('need libc for wcslen()') + if not self.is_le32(): return self.skip('this test uses inline js, which requires le32') + self.do_run(open(path_from_root('tests', 'utf32.cpp')).read(), 'OK.') + self.do_run(open(path_from_root('tests', 'utf32.cpp')).read(), 'OK.', args=['-fshort-wchar']) + def test_direct_string_constant_usage(self): if self.emcc_args is None: return self.skip('requires libcxx') @@ -8607,29 +8648,44 @@ def process(filename): Settings.SAFE_HEAP_LINES = ['btVoronoiSimplexSolver.h:40', 'btVoronoiSimplexSolver.h:41', 'btVoronoiSimplexSolver.h:42', 'btVoronoiSimplexSolver.h:43'] - def test(): - self.do_run(open(path_from_root('tests', 'bullet', 'Demos', 'HelloWorld', 'HelloWorld.cpp'), 'r').read(), - [open(path_from_root('tests', 'bullet', 'output.txt'), 'r').read(), # different roundings - open(path_from_root('tests', 'bullet', 'output2.txt'), 'r').read(), - open(path_from_root('tests', 'bullet', 'output3.txt'), 'r').read()], - libraries=self.get_library('bullet', [os.path.join('src', '.libs', 'libBulletDynamics.a'), - os.path.join('src', '.libs', 'libBulletCollision.a'), - os.path.join('src', '.libs', 'libLinearMath.a')], - configure_args=['--disable-demos','--disable-dependency-tracking']), - includes=[path_from_root('tests', 'bullet', 'src')]) - test() - - assert 'asm2g' in test_modes - if self.run_name == 'asm2g': - # Test forced alignment - print >> sys.stderr, 'testing FORCE_ALIGNED_MEMORY' - old = open('src.cpp.o.js').read() - Settings.FORCE_ALIGNED_MEMORY = 1 + configure_commands = [['sh', './configure'], ['cmake', '.']] + configure_args = [['--disable-demos','--disable-dependency-tracking'], ['-DBUILD_DEMOS=OFF', '-DBUILD_EXTRAS=OFF']] + for c in range(0,2): + configure = configure_commands[c] + # Windows cannot run configure sh scripts. + if WINDOWS and configure[0] == 'sh': + continue + + # Depending on whether 'configure' or 'cmake' is used to build, Bullet places output files in different directory structures. + if configure[0] == 'sh': + generated_libs = [os.path.join('src', '.libs', 'libBulletDynamics.a'), + os.path.join('src', '.libs', 'libBulletCollision.a'), + os.path.join('src', '.libs', 'libLinearMath.a')] + else: + generated_libs = [os.path.join('src', 'BulletDynamics', 'libBulletDynamics.a'), + os.path.join('src', 'BulletCollision', 'libBulletCollision.a'), + os.path.join('src', 'LinearMath', 'libLinearMath.a')] + + def test(): + self.do_run(open(path_from_root('tests', 'bullet', 'Demos', 'HelloWorld', 'HelloWorld.cpp'), 'r').read(), + [open(path_from_root('tests', 'bullet', 'output.txt'), 'r').read(), # different roundings + open(path_from_root('tests', 'bullet', 'output2.txt'), 'r').read(), + open(path_from_root('tests', 'bullet', 'output3.txt'), 'r').read()], + libraries=self.get_library('bullet', generated_libs, configure=configure, configure_args=configure_args[c], cache_name_extra=configure[0]), + includes=[path_from_root('tests', 'bullet', 'src')]) test() - new = open('src.cpp.o.js').read() - print len(old), len(new), old.count('tempBigInt'), new.count('tempBigInt') - assert len(old) > len(new) - assert old.count('tempBigInt') > new.count('tempBigInt') + + assert 'asm2g' in test_modes + if self.run_name == 'asm2g' and configure[0] == 'sh': + # Test forced alignment + print >> sys.stderr, 'testing FORCE_ALIGNED_MEMORY' + old = open('src.cpp.o.js').read() + Settings.FORCE_ALIGNED_MEMORY = 1 + test() + new = open('src.cpp.o.js').read() + print len(old), len(new), old.count('tempBigInt'), new.count('tempBigInt') + assert len(old) > len(new) + assert old.count('tempBigInt') > new.count('tempBigInt') def test_poppler(self): if self.emcc_args is None: return self.skip('very slow, we only do this in emcc runs') diff --git a/tests/test_other.py b/tests/test_other.py index c6f5c333..64be60fa 100644 --- a/tests/test_other.py +++ b/tests/test_other.py @@ -275,60 +275,77 @@ f.close() # TODO: deprecate llvm optimizations, dlmalloc, etc. in emscripten.py. def test_cmake(self): - # On Windows, we want to build cmake-generated Makefiles with mingw32-make instead of e.g. cygwin make, since mingw32-make - # understands Windows paths, and cygwin make additionally produces a cryptic 'not valid bitcode file' errors on files that - # *are* valid bitcode files. - - if os.name == 'nt': - make_command = 'mingw32-make' - emscriptencmaketoolchain = path_from_root('cmake', 'Platform', 'Emscripten.cmake') + # Test all supported generators. + if WINDOWS: + generators = ['MinGW Makefiles', 'NMake Makefiles'] else: - make_command = 'make' - emscriptencmaketoolchain = path_from_root('cmake', 'Platform', 'Emscripten_unix.cmake') + generators = ['Unix Makefiles'] - cmake_cases = ['target_js', 'target_html'] - cmake_outputs = ['hello_world.js', 'hello_world_gles.html'] - for i in range(0, 2): - for configuration in ['Debug', 'Release']: + make_commands = { 'MinGW Makefiles': ['mingw32-make'], 'NMake Makefiles': ['nmake', '/NOLOGO'], 'Unix Makefiles': ['make'] } - # Create a temp workspace folder - cmakelistsdir = path_from_root('tests', 'cmake', cmake_cases[i]) - tempdirname = tempfile.mkdtemp(prefix='emscripten_test_' + self.__class__.__name__ + '_', dir=TEMP_DIR) - try: - os.chdir(tempdirname) - - # Run Cmake - cmd = ['cmake', '-DCMAKE_TOOLCHAIN_FILE='+emscriptencmaketoolchain, - '-DCMAKE_BUILD_TYPE=' + configuration, - '-DCMAKE_MODULE_PATH=' + path_from_root('cmake').replace('\\', '/'), - '-G' 'Unix Makefiles', cmakelistsdir] - ret = Popen(cmd, stdout=PIPE, stderr=PIPE).communicate() - if ret[1] != None and len(ret[1].strip()) > 0: - print >> sys.stderr, ret[1] # If there were any errors, print them directly to console for diagnostics. - if 'error' in ret[1].lower(): - print >> sys.stderr, 'Failed command: ' + ' '.join(cmd) - print >> sys.stderr, 'Result:\n' + ret[1] - raise Exception('cmake call failed!') - assert os.path.exists(tempdirname + '/Makefile'), 'CMake call did not produce a Makefile!' - - # Build - cmd = [make_command] - ret = Popen(cmd, stdout=PIPE).communicate() - if ret[1] != None and len(ret[1].strip()) > 0: - print >> sys.stderr, ret[1] # If there were any errors, print them directly to console for diagnostics. - if 'error' in ret[0].lower() and not '0 error(s)' in ret[0].lower(): - print >> sys.stderr, 'Failed command: ' + ' '.join(cmd) - print >> sys.stderr, 'Result:\n' + ret[0] - raise Exception('make failed!') - assert os.path.exists(tempdirname + '/' + cmake_outputs[i]), 'Building a cmake-generated Makefile failed to produce an output file %s!' % tempdirname + '/' + cmake_outputs[i] - - # Run through node, if CMake produced a .js file. - if cmake_outputs[i].endswith('.js'): - ret = Popen(listify(NODE_JS) + [tempdirname + '/' + cmake_outputs[i]], stdout=PIPE).communicate()[0] - assert 'hello, world!' in ret, 'Running cmake-based .js application failed!' - finally: - os.chdir(path_from_root('tests')) # Move away from the directory we are about to remove. - shutil.rmtree(tempdirname) + if os.name == 'nt': + emconfigure = path_from_root('emconfigure.bat') + else: + emconfigure = path_from_root('emconfigure') + + for generator in generators: + if generator == 'NMake Makefiles' and not Building.which('nmake'): + print >> sys.stderr, 'Skipping NMake test for CMake support, since nmake was not found in PATH. Run this test in Visual Studio command prompt to easily access nmake.' + continue + + make = make_commands[generator] + cmake_cases = ['target_js', 'target_html'] + cmake_outputs = ['hello_world.js', 'hello_world_gles.html'] + for i in range(0, 2): + for configuration in ['Debug', 'Release']: + # CMake can be invoked in two ways, using 'emconfigure cmake', or by directly running 'cmake'. + # Test both methods. + for invoke_method in ['cmake', 'emconfigure']: + + # Create a temp workspace folder + cmakelistsdir = path_from_root('tests', 'cmake', cmake_cases[i]) + tempdirname = tempfile.mkdtemp(prefix='emscripten_test_' + self.__class__.__name__ + '_', dir=TEMP_DIR) + try: + os.chdir(tempdirname) + + verbose_level = int(os.getenv('EM_BUILD_VERBOSE')) if os.getenv('EM_BUILD_VERBOSE') != None else 0 + + # Run Cmake + if invoke_method == 'cmake': + # Test invoking cmake directly. + cmd = ['cmake', '-DCMAKE_TOOLCHAIN_FILE='+path_from_root('cmake', 'Platform', 'Emscripten.cmake'), + '-DCMAKE_BUILD_TYPE=' + configuration, '-G', generator, cmakelistsdir] + else: + # Test invoking via 'emconfigure cmake' + cmd = [emconfigure, 'cmake', '-DCMAKE_BUILD_TYPE=' + configuration, '-G', generator, cmakelistsdir] + + ret = Popen(cmd, stdout=None if verbose_level >= 2 else PIPE, stderr=None if verbose_level >= 1 else PIPE).communicate() + if len(ret) > 1 and ret[1] != None and len(ret[1].strip()) > 0: + logging.error(ret[1]) # If there were any errors, print them directly to console for diagnostics. + if len(ret) > 1 and ret[1] != None and 'error' in ret[1].lower(): + logging.error('Failed command: ' + ' '.join(cmd)) + logging.error('Result:\n' + ret[1]) + raise Exception('cmake call failed!') + assert os.path.exists(tempdirname + '/Makefile'), 'CMake call did not produce a Makefile!' + + # Build + cmd = make + (['VERBOSE=1'] if verbose_level >= 3 else []) + ret = Popen(cmd, stdout=None if verbose_level >= 2 else PIPE).communicate() + if len(ret) > 1 and ret[1] != None and len(ret[1].strip()) > 0: + logging.error(ret[1]) # If there were any errors, print them directly to console for diagnostics. + if len(ret) > 0 and ret[0] != None and 'error' in ret[0].lower() and not '0 error(s)' in ret[0].lower(): + logging.error('Failed command: ' + ' '.join(cmd)) + logging.error('Result:\n' + ret[0]) + raise Exception('make failed!') + assert os.path.exists(tempdirname + '/' + cmake_outputs[i]), 'Building a cmake-generated Makefile failed to produce an output file %s!' % tempdirname + '/' + cmake_outputs[i] + + # Run through node, if CMake produced a .js file. + if cmake_outputs[i].endswith('.js'): + ret = Popen(listify(NODE_JS) + [tempdirname + '/' + cmake_outputs[i]], stdout=PIPE).communicate()[0] + assert 'hello, world!' in ret, 'Running cmake-based .js application failed!' + finally: + os.chdir(path_from_root('tests')) # Move away from the directory we are about to remove. + shutil.rmtree(tempdirname) def test_failure_error_code(self): for compiler in [EMCC, EMXX]: diff --git a/tests/utf32.cpp b/tests/utf32.cpp new file mode 100644 index 00000000..6b75b244 --- /dev/null +++ b/tests/utf32.cpp @@ -0,0 +1,53 @@ +#include <stdio.h> +#include <string> +#include <emscripten.h> +#include <cassert> +#include <wchar.h> + +typedef unsigned int utf32; +typedef unsigned short utf16; + +// This code tests that Unicode std::wstrings can be marshalled between C++ and JS. +int main() { + std::wstring wstr = L"abc\u2603\u20AC\U0002007C123 --- abc\u2603\u20AC\U0002007C123"; // U+2603 is snowman, U+20AC is the Euro sign, U+2007C is a Chinese Han character that looks like three raindrops. + + printf("sizeof(wchar_t): %d.\n", (int)sizeof(wchar_t)); + + if (sizeof(wchar_t) == 4) { + utf32 *memory = new utf32[wstr.length()+1]; + + asm("var str = Module.UTF32ToString(%0);" + "Module.print(str);" + "Module.stringToUTF32(str, %1);" + : + : "r"(wstr.c_str()), "r"(memory)); + + // Compare memory to confirm that the string is intact after taking a route through JS side. + const utf32 *srcPtr = reinterpret_cast<const utf32 *>(wstr.c_str()); + for(int i = 0;; ++i) { + assert(memory[i] == srcPtr[i]); + if (srcPtr[i] == 0) + break; + } + delete[] memory; + } else { // sizeof(wchar_t) == 2, and we're building with -fshort-wchar. + utf16 *memory = new utf16[2*wstr.length()+1]; + + asm("var str = Module.UTF16ToString(%0);" + "Module.print(str);" + "Module.stringToUTF16(str, %1);" + : + : "r"(wstr.c_str()), "r"(memory)); + + // Compare memory to confirm that the string is intact after taking a route through JS side. + const utf16 *srcPtr = reinterpret_cast<const utf16 *>(wstr.c_str()); + for(int i = 0;; ++i) { + assert(memory[i] == srcPtr[i]); + if (srcPtr[i] == 0) + break; + } + delete[] memory; + } + + printf("OK.\n"); +} |