diff options
| Commit | 4c31ba3bfe9ab51ee25d02f008df848e24f21a98 (patch) | |
|---|---|---|
| Author | 2018-10-29 21:27:21 +0200 | |
| Committer | 2018-10-29 21:27:21 +0200 | |
| Files | 186f366fd86d4ae634a6e21751875a1e7b8f276d /JSImpl | |
| IPL-4c31ba3bfe9ab51ee25d02f008df848e24f21a98.tar IPL-4c31ba3bfe9ab51ee25d02f008df848e24f21a98.tar.gz IPL-4c31ba3bfe9ab51ee25d02f008df848e24f21a98.zip | ||
| Parent | 806d126b79229ebd36023ca1dd4baae7b520c67f (diff) | |
| Parent | f747ef432192c2742ef8fd29496c117290240369 (diff) | |
Merge pull request #29 from SofiaCPP/testing
Testing
18 files changed, 1257 insertions, 285 deletions
| -rw-r--r-- | JSImpl/solution/JSImpl.sln | 106 | ||||
| -rw-r--r-- | JSImpl/solution/JSImpl.vcxproj | 251 | ||||
| -rw-r--r-- | JSImpl/solution/JSImpl.vcxproj.filters | 19 | ||||
| -rw-r--r-- | JSImpl/solution/JSLib.vcxproj | 140 | ||||
| -rw-r--r-- | JSImpl/solution/JSLib.vcxproj.filters | 54 | ||||
| -rw-r--r-- | JSImpl/solution/genie.lua | 35 | ||||
| -rw-r--r-- | JSImpl/test/LexerTests.cpp (renamed from JSImpl/src/Tests/main.cpp) | 169 | ||||
| -rw-r--r-- | JSImpl/test/ParserTests.cpp | 22 | ||||
| -rw-r--r-- | JSImpl/test/Test.vcxproj | 143 | ||||
| -rw-r--r-- | JSImpl/test/Test.vcxproj.filters | 8 | ||||
| -rw-r--r-- | JSImpl/test/empty.cpp | 5 | ||||
| -rw-r--r-- | JSImpl/test/genie.lua | 54 | ||||
| -rw-r--r-- | JSImpl/test/gmock.vcxproj | 138 | ||||
| -rw-r--r-- | JSImpl/test/gmock.vcxproj.filters | 60 | ||||
| -rw-r--r-- | JSImpl/test/gtest.vcxproj | 137 | ||||
| -rw-r--r-- | JSImpl/test/gtest.vcxproj.filters | 57 | ||||
| -rw-r--r-- | JSImpl/test/gtest_main.vcxproj | 125 | ||||
| -rw-r--r-- | JSImpl/test/gtest_main.vcxproj.filters | 19 |
diff --git a/JSImpl/solution/JSImpl.sln b/JSImpl/solution/JSImpl.sln index 9deeed2..bbd3b9f 100644 --- a/JSImpl/solution/JSImpl.sln +++ b/JSImpl/solution/JSImpl.sln @@ -1,45 +1,61 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JSImpl", "JSImpl.vcxproj", "{EE0F8C6F-3619-4A46-BC19-FAEAD4167EE4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JS.Common", "..\projects\JS.Common\JS.Common.vcxitems", "{45D41ACC-2C3C-43D2-BC10-02AA73FFC7C7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestApp", "..\projects\TestApp\TestApp.vcxproj", "{05DB0989-2720-45CC-8689-2FF047B4FD74}" -EndProject -Global - GlobalSection(SharedMSBuildProjectFiles) = preSolution - ..\projects\JS.Common\JS.Common.vcxitems*{05db0989-2720-45cc-8689-2ff047b4fd74}*SharedItemsImports = 4 - ..\projects\JS.Common\JS.Common.vcxitems*{45d41acc-2c3c-43d2-bc10-02aa73ffc7c7}*SharedItemsImports = 9 - ..\projects\JS.Common\JS.Common.vcxitems*{ee0f8c6f-3619-4a46-bc19-faead4167ee4}*SharedItemsImports = 4 - EndGlobalSection - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {EE0F8C6F-3619-4A46-BC19-FAEAD4167EE4}.Debug|x64.ActiveCfg = Debug|x64 - {EE0F8C6F-3619-4A46-BC19-FAEAD4167EE4}.Debug|x64.Build.0 = Debug|x64 - {EE0F8C6F-3619-4A46-BC19-FAEAD4167EE4}.Debug|x86.ActiveCfg = Debug|Win32 - {EE0F8C6F-3619-4A46-BC19-FAEAD4167EE4}.Debug|x86.Build.0 = Debug|Win32 - {EE0F8C6F-3619-4A46-BC19-FAEAD4167EE4}.Release|x64.ActiveCfg = Release|x64 - {EE0F8C6F-3619-4A46-BC19-FAEAD4167EE4}.Release|x64.Build.0 = Release|x64 - {EE0F8C6F-3619-4A46-BC19-FAEAD4167EE4}.Release|x86.ActiveCfg = Release|Win32 - {EE0F8C6F-3619-4A46-BC19-FAEAD4167EE4}.Release|x86.Build.0 = Release|Win32 - {05DB0989-2720-45CC-8689-2FF047B4FD74}.Debug|x64.ActiveCfg = Debug|x64 - {05DB0989-2720-45CC-8689-2FF047B4FD74}.Debug|x64.Build.0 = Debug|x64 - {05DB0989-2720-45CC-8689-2FF047B4FD74}.Debug|x86.ActiveCfg = Debug|Win32 - {05DB0989-2720-45CC-8689-2FF047B4FD74}.Debug|x86.Build.0 = Debug|Win32 - {05DB0989-2720-45CC-8689-2FF047B4FD74}.Release|x64.ActiveCfg = Release|x64 - {05DB0989-2720-45CC-8689-2FF047B4FD74}.Release|x64.Build.0 = Release|x64 - {05DB0989-2720-45CC-8689-2FF047B4FD74}.Release|x86.ActiveCfg = Release|Win32 - {05DB0989-2720-45CC-8689-2FF047B4FD74}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Test", "..\test\Test.vcxproj", "{45DC8C7C-3113-8E0D-DAFF-7310C6150A0F}"
+ ProjectSection(ProjectDependencies) = postProject
+ {19EA680D-85FE-90BE-4E80-341EBA538DEF} = {19EA680D-85FE-90BE-4E80-341EBA538DEF}
+ {EC34880F-5849-B0C0-21CB-53208D9EACF1} = {EC34880F-5849-B0C0-21CB-53208D9EACF1}
+ {B686840F-229B-ACC0-EB1C-502057F0A8F1} = {B686840F-229B-ACC0-EB1C-502057F0A8F1}
+ {30B03E7E-1C68-80CB-856F-592771461BBC} = {30B03E7E-1C68-80CB-856F-592771461BBC}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JSLib", "JSLib.vcxproj", "{19EA680D-85FE-90BE-4E80-341EBA538DEF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JSImpl", "JSImpl.vcxproj", "{549B84BA-403D-AF90-29F8-C2E4153936E1}"
+ ProjectSection(ProjectDependencies) = postProject
+ {19EA680D-85FE-90BE-4E80-341EBA538DEF} = {19EA680D-85FE-90BE-4E80-341EBA538DEF}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest", "..\test\gtest.vcxproj", "{EC34880F-5849-B0C0-21CB-53208D9EACF1}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gmock", "..\test\gmock.vcxproj", "{B686840F-229B-ACC0-EB1C-502057F0A8F1}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_main", "..\test\gtest_main.vcxproj", "{30B03E7E-1C68-80CB-856F-592771461BBC}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {45DC8C7C-3113-8E0D-DAFF-7310C6150A0F}.Debug|x64.ActiveCfg = Debug|x64
+ {45DC8C7C-3113-8E0D-DAFF-7310C6150A0F}.Debug|x64.Build.0 = Debug|x64
+ {45DC8C7C-3113-8E0D-DAFF-7310C6150A0F}.Release|x64.ActiveCfg = Release|x64
+ {45DC8C7C-3113-8E0D-DAFF-7310C6150A0F}.Release|x64.Build.0 = Release|x64
+ {19EA680D-85FE-90BE-4E80-341EBA538DEF}.Debug|x64.ActiveCfg = Debug|x64
+ {19EA680D-85FE-90BE-4E80-341EBA538DEF}.Debug|x64.Build.0 = Debug|x64
+ {19EA680D-85FE-90BE-4E80-341EBA538DEF}.Release|x64.ActiveCfg = Release|x64
+ {19EA680D-85FE-90BE-4E80-341EBA538DEF}.Release|x64.Build.0 = Release|x64
+ {549B84BA-403D-AF90-29F8-C2E4153936E1}.Debug|x64.ActiveCfg = Debug|x64
+ {549B84BA-403D-AF90-29F8-C2E4153936E1}.Debug|x64.Build.0 = Debug|x64
+ {549B84BA-403D-AF90-29F8-C2E4153936E1}.Release|x64.ActiveCfg = Release|x64
+ {549B84BA-403D-AF90-29F8-C2E4153936E1}.Release|x64.Build.0 = Release|x64
+ {EC34880F-5849-B0C0-21CB-53208D9EACF1}.Debug|x64.ActiveCfg = Debug|x64
+ {EC34880F-5849-B0C0-21CB-53208D9EACF1}.Debug|x64.Build.0 = Debug|x64
+ {EC34880F-5849-B0C0-21CB-53208D9EACF1}.Release|x64.ActiveCfg = Release|x64
+ {EC34880F-5849-B0C0-21CB-53208D9EACF1}.Release|x64.Build.0 = Release|x64
+ {B686840F-229B-ACC0-EB1C-502057F0A8F1}.Debug|x64.ActiveCfg = Debug|x64
+ {B686840F-229B-ACC0-EB1C-502057F0A8F1}.Debug|x64.Build.0 = Debug|x64
+ {B686840F-229B-ACC0-EB1C-502057F0A8F1}.Release|x64.ActiveCfg = Release|x64
+ {B686840F-229B-ACC0-EB1C-502057F0A8F1}.Release|x64.Build.0 = Release|x64
+ {30B03E7E-1C68-80CB-856F-592771461BBC}.Debug|x64.ActiveCfg = Debug|x64
+ {30B03E7E-1C68-80CB-856F-592771461BBC}.Debug|x64.Build.0 = Debug|x64
+ {30B03E7E-1C68-80CB-856F-592771461BBC}.Release|x64.ActiveCfg = Release|x64
+ {30B03E7E-1C68-80CB-856F-592771461BBC}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ EndGlobalSection
+EndGlobal
diff --git a/JSImpl/solution/JSImpl.vcxproj b/JSImpl/solution/JSImpl.vcxproj index 39beeba..e2d50d1 100644 --- a/JSImpl/solution/JSImpl.vcxproj +++ b/JSImpl/solution/JSImpl.vcxproj @@ -1,125 +1,126 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{EE0F8C6F-3619-4A46-BC19-FAEAD4167EE4}</ProjectGuid> - <RootNamespace>JSImpl</RootNamespace> - <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>v140</PlatformToolset> - <CharacterSet>MultiByte</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>v140</PlatformToolset> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>MultiByte</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>v140</PlatformToolset> - <CharacterSet>MultiByte</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>v140</PlatformToolset> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>MultiByte</CharacterSet> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Label="Shared"> - <Import Project="..\projects\JS.Common\JS.Common.vcxitems" Label="Shared" /> - </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> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <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|x64'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup /> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <WarningLevel>Level4</WarningLevel> - <Optimization>Disabled</Optimization> - <SDLCheck>true</SDLCheck> - <TreatWarningAsError>true</TreatWarningAsError> - </ClCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <WarningLevel>Level4</WarningLevel> - <Optimization>Disabled</Optimization> - <SDLCheck>true</SDLCheck> - <TreatWarningAsError>true</TreatWarningAsError> - </ClCompile> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <WarningLevel>Level4</WarningLevel> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <SDLCheck>true</SDLCheck> - <TreatWarningAsError>true</TreatWarningAsError> - </ClCompile> - <Link> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <WarningLevel>Level4</WarningLevel> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <SDLCheck>true</SDLCheck> - <DebugInformationFormat>None</DebugInformationFormat> - <WholeProgramOptimization>true</WholeProgramOptimization> - <TreatWarningAsError>true</TreatWarningAsError> - </ClCompile> - <Link> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - </Link> - </ItemDefinitionGroup> - <ItemGroup> - <ClCompile Include="..\src\main.cpp" /> - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project>
\ No newline at end of file +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{549B84BA-403D-AF90-29F8-C2E4153936E1}</ProjectGuid>
+ <RootNamespace>JSImpl</RootNamespace>
+ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <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|x64'">
+ <OutDir>..\build\bin\Debug\</OutDir>
+ <IntDir>..\build\obj\Debug\x64\Debug\JSImpl\</IntDir>
+ <TargetName>JSImpl</TargetName>
+ <TargetExt>.exe</TargetExt>
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>..\build\bin\Release\</OutDir>
+ <IntDir>..\build\obj\Release\x64\Release\JSImpl\</IntDir>
+ <TargetName>JSImpl</TargetName>
+ <TargetExt>.exe</TargetExt>
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <PrecompiledHeader></PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <ProgramDataBaseFileName>$(IntDir)JSImpl.compile.pdb</ProgramDataBaseFileName>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)JSImpl.pdb</ProgramDatabaseFile>
+ <OutputFile>$(OutDir)JSImpl.exe</OutputFile>
+ <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <PrecompiledHeader></PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <ProgramDataBaseFileName>$(IntDir)JSImpl.compile.pdb</ProgramDataBaseFileName>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)JSImpl.pdb</ProgramDatabaseFile>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <OutputFile>$(OutDir)JSImpl.exe</OutputFile>
+ <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\main.cpp">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="JSLib.vcxproj">
+ <Project>{19EA680D-85FE-90BE-4E80-341EBA538DEF}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/JSImpl/solution/JSImpl.vcxproj.filters b/JSImpl/solution/JSImpl.vcxproj.filters index de250fc..daeea8c 100644 --- a/JSImpl/solution/JSImpl.vcxproj.filters +++ b/JSImpl/solution/JSImpl.vcxproj.filters @@ -1,6 +1,13 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <ClCompile Include="..\src\main.cpp" /> - </ItemGroup> -</Project>
\ No newline at end of file +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="src">
+ <UniqueIdentifier>{2DAB880B-99B4-887C-2230-9F7C8E38947C}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\main.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
diff --git a/JSImpl/solution/JSLib.vcxproj b/JSImpl/solution/JSLib.vcxproj new file mode 100644 index 0000000..69f19e0 --- /dev/null +++ b/JSImpl/solution/JSLib.vcxproj @@ -0,0 +1,140 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{19EA680D-85FE-90BE-4E80-341EBA538DEF}</ProjectGuid>
+ <RootNamespace>JSLib</RootNamespace>
+ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <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|x64'">
+ <OutDir>..\build\bin\Debug\</OutDir>
+ <IntDir>..\build\obj\Debug\x64\Debug\JSLib\</IntDir>
+ <TargetName>JSLib</TargetName>
+ <TargetExt>.lib</TargetExt>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>..\build\bin\Release\</OutDir>
+ <IntDir>..\build\obj\Release\x64\Release\JSLib\</IntDir>
+ <TargetName>JSLib</TargetName>
+ <TargetExt>.lib</TargetExt>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <PrecompiledHeader></PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <ProgramDataBaseFileName>$(OutDir)JSLib.pdb</ProgramDataBaseFileName>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)JSLib.lib</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)JSLib.pdb</ProgramDatabaseFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <PrecompiledHeader></PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <ProgramDataBaseFileName>$(OutDir)JSLib.pdb</ProgramDataBaseFileName>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)JSLib.lib</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)JSLib.pdb</ProgramDatabaseFile>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\src\ASTInterpreter.h" />
+ <ClInclude Include="..\src\ASTPrinter.h" />
+ <ClInclude Include="..\src\CommonTypes.h" />
+ <ClInclude Include="..\src\Expression.h" />
+ <ClInclude Include="..\src\ExpressionDefinitions.h" />
+ <ClInclude Include="..\src\ExpressionsFwd.h" />
+ <ClInclude Include="..\src\ExpressionVisitor.h" />
+ <ClInclude Include="..\src\Lexer.h" />
+ <ClInclude Include="..\src\Parser.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\ASTInterpreter.cpp">
+ </ClCompile>
+ <ClCompile Include="..\src\ASTPrinter.cpp">
+ </ClCompile>
+ <ClCompile Include="..\src\Expression.cpp">
+ </ClCompile>
+ <ClCompile Include="..\src\Lexer.cpp">
+ </ClCompile>
+ <ClCompile Include="..\src\Parser.cpp">
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/JSImpl/solution/JSLib.vcxproj.filters b/JSImpl/solution/JSLib.vcxproj.filters new file mode 100644 index 0000000..afcbbb9 --- /dev/null +++ b/JSImpl/solution/JSLib.vcxproj.filters @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="src">
+ <UniqueIdentifier>{2DAB880B-99B4-887C-2230-9F7C8E38947C}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\src\ASTInterpreter.h">
+ <Filter>src</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\ASTPrinter.h">
+ <Filter>src</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\CommonTypes.h">
+ <Filter>src</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\Expression.h">
+ <Filter>src</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\ExpressionDefinitions.h">
+ <Filter>src</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\ExpressionsFwd.h">
+ <Filter>src</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\ExpressionVisitor.h">
+ <Filter>src</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\Lexer.h">
+ <Filter>src</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\Parser.h">
+ <Filter>src</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\ASTInterpreter.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\ASTPrinter.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\Expression.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\Lexer.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\Parser.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
diff --git a/JSImpl/solution/genie.lua b/JSImpl/solution/genie.lua index 571bf9c..8b34d97 100644 --- a/JSImpl/solution/genie.lua +++ b/JSImpl/solution/genie.lua @@ -1,25 +1,40 @@ -solution 'IPL' - configurations {'debug', 'release'} +solution 'JSImpl' + configurations {'Debug', 'Release'} + platforms { 'x64' } flags { 'FatalWarnings', 'ExtraWarnings', 'Cpp14', + 'Symbols', } + local root = '../build/' - configuration 'debug' - targetdir(root .. 'bin/debug') - objdir(root .. 'obj/debug') + configuration 'Debug' + targetdir(root .. 'bin/Debug') + objdir(root .. 'obj/Debug') - configuration 'release' - targetdir(root .. 'bin/release') - objdir(root .. 'obj/release') + configuration 'Release' + flags 'OptimizeSpeed' + targetdir(root .. 'bin/Release') + objdir(root .. 'obj/Release') configuration '*' + project 'JSLib' + kind 'StaticLib' + language 'C++' + uuid(os.uuid('JSLib')) + files '../src/*.cpp' + removefiles '../src/main.cpp' + files '../src/*.h' + project 'JSImpl' kind 'ConsoleApp' language 'C++' uuid(os.uuid('JSImpl')) - files '../src/*.cpp' - files '../src/*.h' + files '../src/main.cpp' + links 'JSLib' + + include '../test' + startproject 'Test' diff --git a/JSImpl/src/Tests/main.cpp b/JSImpl/test/LexerTests.cpp index f92144a..2f13916 100644 --- a/JSImpl/src/Tests/main.cpp +++ b/JSImpl/test/LexerTests.cpp @@ -1,100 +1,125 @@ -#include "Lexer.h" -#include "Parser.h" -#include "ASTPrinter.h" -#include "ASTInterpreter.h" -#include <iostream> -#define LOG(msg) std::cout << msg << std::endl -#define EXECUTE_TEST(test) std::cout << #test << " "; test(); +#include <src/Lexer.h> +#include <src/CommonTypes.h> -#define CHECK(cond) if (cond) {LOG("PASS");} else {LOG(#cond " FAIL");} +#include <gtest/gtest.h> -// Lexer Tests -void TestLess() +TEST(Lexer, Less) { IPLVector<Token> tokens; Tokenize("<", tokens); - CHECK(tokens.size() == 2 && tokens[0].Type == TokenType::Less); + ASSERT_EQ(tokens.size(), 2u); + ASSERT_EQ(tokens[0].Type, TokenType::Less); } -void TestNumber() +TEST(Lexer, Number) { IPLVector<Token> tokens; Tokenize("213434.24", tokens); - CHECK(tokens.size() == 2 && tokens[0].Type == TokenType::Number && tokens[0].Number == 213434.24); + ASSERT_EQ(tokens.size(), 2u); + ASSERT_EQ(tokens[0].Type, TokenType::Number); + ASSERT_EQ(tokens[0].Number, 213434.24); } -void TestNumberStartWithNine() + +TEST(Lexer, HexNumber) +{ + IPLVector<Token> tokens; + auto result = Tokenize("0x10", tokens); + + ASSERT_TRUE(result.IsSuccessful); + ASSERT_EQ(tokens.size(), 2u); + ASSERT_EQ(tokens[0].Type, TokenType::Number); + ASSERT_EQ(tokens[0].Number, 16); +} + +TEST(Lexer, ScientificNotationNumber) +{ + IPLVector<Token> tokens; + auto result = Tokenize("1e2", tokens); + + ASSERT_TRUE(result.IsSuccessful); + ASSERT_EQ(tokens.size(), 2u); + ASSERT_EQ(tokens[0].Type, TokenType::Number); + ASSERT_EQ(tokens[0].Number, 100); +} + +TEST(Lexer, NumberStartWithNine) { IPLVector<Token> tokens; Tokenize("999", tokens); - CHECK(tokens.size() == 2 && tokens[0].Type == TokenType::Number && tokens[0].Number == 999); + ASSERT_EQ(tokens.size(), 2u); + ASSERT_EQ(tokens[0].Type, TokenType::Number); + ASSERT_EQ(tokens[0].Number, 999); } -void TestNumberStartWithZero() +TEST(Lexer, NumberStartWithZero) { IPLVector<Token> tokens; Tokenize("0999", tokens); - CHECK(tokens.size() == 2 && tokens[0].Type == TokenType::Number && tokens[0].Number == 999); + ASSERT_EQ(tokens.size(), 2u); + ASSERT_EQ(tokens[0].Type, TokenType::Number); + ASSERT_EQ(tokens[0].Number, 999); } -void TestSpaceNewLineSpace() +TEST(Lexer, SpaceNewLineSpace) { IPLVector<Token> tokens; Tokenize(" \n var a = 4; ", tokens); - CHECK(tokens.size() == 6 && tokens[0].Type == TokenType::Var && - tokens[1].Type == TokenType::Identifier && + ASSERT_TRUE(tokens.size() == 6 && tokens[0].Type == TokenType::Var && + tokens[1].Type == TokenType::Identifier && tokens[2].Type == TokenType::Equal && tokens[3].Type == TokenType::Number && tokens[4].Type == TokenType::Semicolon); } -void TestString() +TEST(Lexer, String) { IPLVector<Token> tokens; Tokenize("\"alabala\"", tokens); - CHECK(tokens.size() == 2 && tokens[0].Type == TokenType::String && tokens[0].Lexeme == "\"alabala\""); + ASSERT_TRUE(tokens.size() == 2 && tokens[0].Type == TokenType::String + && tokens[0].Lexeme == "\"alabala\""); } -void TestStringSingleQuotedStrings() +TEST(Lexer, StringSingleQuotedStrings) { IPLVector<Token> tokens; Tokenize("'alabala'", tokens); - CHECK(tokens.size() == 2 && tokens[0].Type == TokenType::String && tokens[0].Lexeme == "'alabala'"); + ASSERT_TRUE(tokens.size() == 2 && tokens[0].Type == TokenType::String && tokens[0].Lexeme == "'alabala'"); } -void TestKeyWord() +TEST(Lexer, KeyWord) { IPLVector<Token> tokens; Tokenize("for", tokens); - CHECK(tokens.size() == 2 && tokens[0].Type == TokenType::For); + ASSERT_TRUE(tokens.size() == 2 && tokens[0].Type == TokenType::For); } -void TestVariableDeclaration() +TEST(Lexer, VariableDeclaration) { IPLVector<Token> tokens; Tokenize("var pesho = 10", tokens); - CHECK(tokens.size() == 5 && tokens[0].Type == TokenType::Var + ASSERT_TRUE(tokens.size() == 5 && tokens[0].Type == TokenType::Var && tokens[1].Type == TokenType::Identifier && tokens[2].Type == TokenType::Equal && tokens[3].Type == TokenType::Number && tokens[4].Type == TokenType::Eof); } -void TestStringError() +TEST(Lexer, StringError) { IPLVector<Token> tokens; const auto& res = Tokenize("\" aaaa", tokens); - CHECK(!res.IsSuccessful && res.Error.Row == 0 && res.Error.Column == 6); + ASSERT_TRUE(!res.IsSuccessful && res.Error.Row == 0 && res.Error.Column == 6); } -void TestWhiteSpaceTokens() +TEST(Lexer, TestWhiteSpaceTokens) { IPLVector<Token> tokens; const auto& res = Tokenize(" 1\n2 abc\n \n", tokens, { true, false }); - CHECK(res.IsSuccessful + ASSERT_TRUE(res.IsSuccessful && tokens.size() == 8 && tokens[0].Type == TokenType::Whitespace && tokens[0].Lexeme == " " @@ -113,33 +138,33 @@ void TestWhiteSpaceTokens() && tokens[7].Type == TokenType::Eof); } -void TestSimpleComment() +TEST(Lexer, SimpleComment) { IPLVector<Token> tokens; const auto& res = Tokenize("//comment", tokens, { false, true }); - CHECK(res.IsSuccessful + ASSERT_TRUE(res.IsSuccessful && tokens.size() == 2 && tokens[0].Type == TokenType::Comment && tokens[0].Lexeme == "//comment" && tokens[1].Type == TokenType::Eof); } -void TestSimpleMultiLineComment() +TEST(Lexer, SimpleMultiLineComment) { IPLVector<Token> tokens; const auto& res = Tokenize("/*comment\ncomment*/", tokens, { false, true }); - CHECK(res.IsSuccessful + ASSERT_TRUE(res.IsSuccessful && tokens.size() == 2 && tokens[0].Type == TokenType::Comment && tokens[0].Lexeme == "/*comment\ncomment*/" && tokens[1].Type == TokenType::Eof); } -void TestConsecutiveMultiLineComment() +TEST(Lexer, ConsecutiveMultiLineComment) { IPLVector<Token> tokens; const auto& res = Tokenize("/*comment1\ncomment1*//*comment2\ncomment2*/", tokens, { false, true }); - CHECK(res.IsSuccessful + ASSERT_TRUE(res.IsSuccessful && tokens.size() == 3 && tokens[0].Type == TokenType::Comment && tokens[0].Lexeme == "/*comment1\ncomment1*/" @@ -148,11 +173,11 @@ void TestConsecutiveMultiLineComment() && tokens[2].Type == TokenType::Eof); } -void TestConsecutiveMultiLineCommentWithSpace() +TEST(Lexer, ConsecutiveMultiLineCommentWithSpace) { IPLVector<Token> tokens; const auto& res = Tokenize("/*comment1\ncomment1*/\n\n\n/*comment2\ncomment2*/", tokens, { false, true }); - CHECK(res.IsSuccessful + ASSERT_TRUE(res.IsSuccessful && tokens.size() == 3 && tokens[0].Type == TokenType::Comment && tokens[0].Lexeme == "/*comment1\ncomment1*/" @@ -161,11 +186,11 @@ void TestConsecutiveMultiLineCommentWithSpace() && tokens[2].Type == TokenType::Eof); } -void TestConsecutiveMultiLineCommentWithSpaceWithTokens() +TEST(Lexer, ConsecutiveMultiLineCommentWithSpaceWithTokens) { IPLVector<Token> tokens; const auto& res = Tokenize("//comment1\n/*comment2\ncomment2*/\n\n\n/*comment3\ncomment3*/", tokens, { true, true }); - CHECK(res.IsSuccessful + ASSERT_TRUE(res.IsSuccessful && tokens.size() == 6 && tokens[0].Type == TokenType::Comment && tokens[0].Lexeme == "//comment1" @@ -180,65 +205,11 @@ void TestConsecutiveMultiLineCommentWithSpaceWithTokens() && tokens[5].Type == TokenType::Eof); } -void TestCommentError() +TEST(Lexer, CommentError) { IPLVector<Token> tokens; const auto& res = Tokenize(" aa\n /*", tokens); - CHECK(!res.IsSuccessful && res.Error.Row == 1 && res.Error.Column == 3); + ASSERT_TRUE(!res.IsSuccessful && res.Error.Row == 1 && + res.Error.Column == 3); } -// Parser Tests -void TestParseUnaryExpr() -{ - IPLVector<Token> tokens; - Tokenize("function pesho() { var a = 0; return a; } var a = \"3\";", tokens); - - // TODO make actual test :D - auto expr = Parse(tokens); - ASTPrinter p(std::cout); - expr->Accept(p); - std::cout << "\n"; -} - -void TestHexNumber() -{ - IPLVector<Token> tokens; - const auto& res = Tokenize("0x10", tokens); - - CHECK(res.IsSuccessful && tokens[0].Type == TokenType::Number && tokens[0].Number == 16); -} - -void TestScientificNotationNumber() -{ - IPLVector<Token> tokens; - const auto& res = Tokenize("1e2", tokens); - - CHECK(res.IsSuccessful && tokens[0].Type == TokenType::Number && tokens[0].Number == 100); -} - -int main() -{ - EXECUTE_TEST(TestLess); - EXECUTE_TEST(TestNumber); - EXECUTE_TEST(TestNumberStartWithNine); - EXECUTE_TEST(TestNumberStartWithZero); - EXECUTE_TEST(TestString); - EXECUTE_TEST(TestSpaceNewLineSpace); - EXECUTE_TEST(TestStringSingleQuotedStrings); - EXECUTE_TEST(TestKeyWord); - EXECUTE_TEST(TestVariableDeclaration); - EXECUTE_TEST(TestWhiteSpaceTokens); - EXECUTE_TEST(TestSimpleComment); - EXECUTE_TEST(TestSimpleMultiLineComment); - EXECUTE_TEST(TestConsecutiveMultiLineComment); - EXECUTE_TEST(TestConsecutiveMultiLineCommentWithSpace); - EXECUTE_TEST(TestConsecutiveMultiLineCommentWithSpaceWithTokens); - EXECUTE_TEST(TestCommentError); - EXECUTE_TEST(TestHexNumber); - EXECUTE_TEST(TestScientificNotationNumber); - -#if defined(_WIN32) - std::system("pause"); -#endif - return 0; -} diff --git a/JSImpl/test/ParserTests.cpp b/JSImpl/test/ParserTests.cpp new file mode 100644 index 0000000..a884f37 --- /dev/null +++ b/JSImpl/test/ParserTests.cpp @@ -0,0 +1,22 @@ +#include <src/CommonTypes.h> +#include <src/Lexer.h> +#include <src/Parser.h> +#include <src/ASTPrinter.h> + +#include <gtest/gtest.h> + +#include <sstream> + +TEST(Parser, ParseUnaryExpr) +{ + IPLVector<Token> tokens; + Tokenize("function pesho() { var a = 0; return a; } var a = \"3\";", tokens); + + // TODO make actual test :D + auto expr = Parse(tokens); + std::ostringstream output; + ASTPrinter p(output); + expr->Accept(p); + ASSERT_TRUE(!output.str().empty()); +} + diff --git a/JSImpl/test/Test.vcxproj b/JSImpl/test/Test.vcxproj new file mode 100644 index 0000000..9c67eae --- /dev/null +++ b/JSImpl/test/Test.vcxproj @@ -0,0 +1,143 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{45DC8C7C-3113-8E0D-DAFF-7310C6150A0F}</ProjectGuid>
+ <RootNamespace>Test</RootNamespace>
+ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <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|x64'">
+ <OutDir>..\build\bin\Debug\</OutDir>
+ <IntDir>..\build\obj\Debug\x64\Debug\Test\</IntDir>
+ <TargetName>Test</TargetName>
+ <TargetExt>.exe</TargetExt>
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>..\build\bin\Release\</OutDir>
+ <IntDir>..\build\obj\Release\x64\Release\Test\</IntDir>
+ <TargetName>Test</TargetName>
+ <TargetExt>.exe</TargetExt>
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>googletest\googletest\include;googletest\googlemock\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <PrecompiledHeader></PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <ProgramDataBaseFileName>$(IntDir)Test.compile.pdb</ProgramDataBaseFileName>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>googletest\googletest\include;googletest\googlemock\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)Test.pdb</ProgramDatabaseFile>
+ <OutputFile>$(OutDir)Test.exe</OutputFile>
+ <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>googletest\googletest\include;googletest\googlemock\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <PrecompiledHeader></PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <ProgramDataBaseFileName>$(IntDir)Test.compile.pdb</ProgramDataBaseFileName>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>googletest\googletest\include;googletest\googlemock\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)Test.pdb</ProgramDatabaseFile>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <OutputFile>$(OutDir)Test.exe</OutputFile>
+ <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="empty.cpp">
+ </ClCompile>
+ <ClCompile Include="LexerTests.cpp">
+ </ClCompile>
+ <ClCompile Include="ParserTests.cpp">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\solution\JSLib.vcxproj">
+ <Project>{19EA680D-85FE-90BE-4E80-341EBA538DEF}</Project>
+ </ProjectReference>
+ <ProjectReference Include="gtest.vcxproj">
+ <Project>{EC34880F-5849-B0C0-21CB-53208D9EACF1}</Project>
+ </ProjectReference>
+ <ProjectReference Include="gmock.vcxproj">
+ <Project>{B686840F-229B-ACC0-EB1C-502057F0A8F1}</Project>
+ </ProjectReference>
+ <ProjectReference Include="gtest_main.vcxproj">
+ <Project>{30B03E7E-1C68-80CB-856F-592771461BBC}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/JSImpl/test/Test.vcxproj.filters b/JSImpl/test/Test.vcxproj.filters new file mode 100644 index 0000000..e1968c9 --- /dev/null +++ b/JSImpl/test/Test.vcxproj.filters @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="empty.cpp" />
+ <ClCompile Include="LexerTests.cpp" />
+ <ClCompile Include="ParserTests.cpp" />
+ </ItemGroup>
+</Project>
diff --git a/JSImpl/test/empty.cpp b/JSImpl/test/empty.cpp new file mode 100644 index 0000000..53d601d --- /dev/null +++ b/JSImpl/test/empty.cpp @@ -0,0 +1,5 @@ +#include <gtest/gtest.h> + +TEST(Empty, Empty) +{ +} diff --git a/JSImpl/test/genie.lua b/JSImpl/test/genie.lua new file mode 100644 index 0000000..262ed18 --- /dev/null +++ b/JSImpl/test/genie.lua @@ -0,0 +1,54 @@ +project 'Test' + kind 'ConsoleApp' + language 'C++' + uuid(os.uuid('Test')) + + files '*.cpp' + + includedirs { + 'googletest/googletest/include', + 'googletest/googlemock/include', + '..', + } + links { + 'JSLib', + 'gtest', + 'gmock', + 'gtest_main', + } + configuration 'Linux' + links 'pthread' + configuration '*' + +project 'gtest' + kind 'StaticLib' + language 'C++' + uuid(os.uuid('gtest')) + files 'googletest/googletest/src/gtest-all.cc' + files 'googletest/googletest/include/gtest/*.h' + includedirs { + 'googletest/googletest', + 'googletest/googletest/include', + } + +project 'gmock' + kind 'StaticLib' + language 'C++' + uuid(os.uuid('gmock')) + files 'googletest/googlemock/src/gmock-all.cc' + files 'googletest/googlemock/include/gmock/*.h' + includedirs { + 'googletest/googlemock', + 'googletest/googlemock/include', + 'googletest/googletest/include', + } + +project 'gtest_main' + kind 'StaticLib' + language 'C++' + uuid(os.uuid('gtest_main')) + files 'googletest/googletest/src/gtest_main.cc' + includedirs { + 'googletest/googletest', + 'googletest/googletest/include', + } diff --git a/JSImpl/test/gmock.vcxproj b/JSImpl/test/gmock.vcxproj new file mode 100644 index 0000000..d2dd518 --- /dev/null +++ b/JSImpl/test/gmock.vcxproj @@ -0,0 +1,138 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{B686840F-229B-ACC0-EB1C-502057F0A8F1}</ProjectGuid>
+ <RootNamespace>gmock</RootNamespace>
+ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <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|x64'">
+ <OutDir>..\build\bin\Debug\</OutDir>
+ <IntDir>..\build\obj\Debug\x64\Debug\gmock\</IntDir>
+ <TargetName>gmock</TargetName>
+ <TargetExt>.lib</TargetExt>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>..\build\bin\Release\</OutDir>
+ <IntDir>..\build\obj\Release\x64\Release\gmock\</IntDir>
+ <TargetName>gmock</TargetName>
+ <TargetExt>.lib</TargetExt>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>googletest\googlemock;googletest\googlemock\include;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <PrecompiledHeader></PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <ProgramDataBaseFileName>$(OutDir)gmock.pdb</ProgramDataBaseFileName>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>googletest\googlemock;googletest\googlemock\include;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)gmock.lib</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)gmock.pdb</ProgramDatabaseFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>googletest\googlemock;googletest\googlemock\include;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <PrecompiledHeader></PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <ProgramDataBaseFileName>$(OutDir)gmock.pdb</ProgramDataBaseFileName>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>googletest\googlemock;googletest\googlemock\include;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)gmock.lib</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)gmock.pdb</ProgramDatabaseFile>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock-actions.h" />
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock-cardinalities.h" />
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock-generated-actions.h" />
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock-generated-function-mockers.h" />
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock-generated-matchers.h" />
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock-generated-nice-strict.h" />
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock-matchers.h" />
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock-more-actions.h" />
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock-more-matchers.h" />
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock-spec-builders.h" />
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="googletest\googlemock\src\gmock-all.cc">
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/JSImpl/test/gmock.vcxproj.filters b/JSImpl/test/gmock.vcxproj.filters new file mode 100644 index 0000000..7ecdd12 --- /dev/null +++ b/JSImpl/test/gmock.vcxproj.filters @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="googletest">
+ <UniqueIdentifier>{E2296FC4-CEE1-B011-37E9-896D23C04B02}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="googletest\googlemock">
+ <UniqueIdentifier>{65B8EA6D-D124-A668-9A18-3EC60644C8D0}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="googletest\googlemock\src">
+ <UniqueIdentifier>{09CEDE5B-7590-12E6-BE40-A1722A42EBC3}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="googletest\googlemock\include">
+ <UniqueIdentifier>{65E05AA0-D1F8-41CA-9AA5-D163067DD663}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="googletest\googlemock\include\gmock">
+ <UniqueIdentifier>{92F8DC2D-FEB1-47D8-8711-62B2F3C9FD47}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock-actions.h">
+ <Filter>googletest\googlemock\include\gmock</Filter>
+ </ClInclude>
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock-cardinalities.h">
+ <Filter>googletest\googlemock\include\gmock</Filter>
+ </ClInclude>
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock-generated-actions.h">
+ <Filter>googletest\googlemock\include\gmock</Filter>
+ </ClInclude>
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock-generated-function-mockers.h">
+ <Filter>googletest\googlemock\include\gmock</Filter>
+ </ClInclude>
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock-generated-matchers.h">
+ <Filter>googletest\googlemock\include\gmock</Filter>
+ </ClInclude>
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock-generated-nice-strict.h">
+ <Filter>googletest\googlemock\include\gmock</Filter>
+ </ClInclude>
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock-matchers.h">
+ <Filter>googletest\googlemock\include\gmock</Filter>
+ </ClInclude>
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock-more-actions.h">
+ <Filter>googletest\googlemock\include\gmock</Filter>
+ </ClInclude>
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock-more-matchers.h">
+ <Filter>googletest\googlemock\include\gmock</Filter>
+ </ClInclude>
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock-spec-builders.h">
+ <Filter>googletest\googlemock\include\gmock</Filter>
+ </ClInclude>
+ <ClInclude Include="googletest\googlemock\include\gmock\gmock.h">
+ <Filter>googletest\googlemock\include\gmock</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="googletest\googlemock\src\gmock-all.cc">
+ <Filter>googletest\googlemock\src</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
diff --git a/JSImpl/test/gtest.vcxproj b/JSImpl/test/gtest.vcxproj new file mode 100644 index 0000000..85be299 --- /dev/null +++ b/JSImpl/test/gtest.vcxproj @@ -0,0 +1,137 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{EC34880F-5849-B0C0-21CB-53208D9EACF1}</ProjectGuid>
+ <RootNamespace>gtest</RootNamespace>
+ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <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|x64'">
+ <OutDir>..\build\bin\Debug\</OutDir>
+ <IntDir>..\build\obj\Debug\x64\Debug\gtest\</IntDir>
+ <TargetName>gtest</TargetName>
+ <TargetExt>.lib</TargetExt>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>..\build\bin\Release\</OutDir>
+ <IntDir>..\build\obj\Release\x64\Release\gtest\</IntDir>
+ <TargetName>gtest</TargetName>
+ <TargetExt>.lib</TargetExt>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>googletest\googletest;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <PrecompiledHeader></PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <ProgramDataBaseFileName>$(OutDir)gtest.pdb</ProgramDataBaseFileName>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>googletest\googletest;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)gtest.lib</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)gtest.pdb</ProgramDatabaseFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>googletest\googletest;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <PrecompiledHeader></PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <ProgramDataBaseFileName>$(OutDir)gtest.pdb</ProgramDataBaseFileName>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>googletest\googletest;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)gtest.lib</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)gtest.pdb</ProgramDatabaseFile>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="googletest\googletest\include\gtest\gtest-death-test.h" />
+ <ClInclude Include="googletest\googletest\include\gtest\gtest-message.h" />
+ <ClInclude Include="googletest\googletest\include\gtest\gtest-param-test.h" />
+ <ClInclude Include="googletest\googletest\include\gtest\gtest-printers.h" />
+ <ClInclude Include="googletest\googletest\include\gtest\gtest-spi.h" />
+ <ClInclude Include="googletest\googletest\include\gtest\gtest-test-part.h" />
+ <ClInclude Include="googletest\googletest\include\gtest\gtest-typed-test.h" />
+ <ClInclude Include="googletest\googletest\include\gtest\gtest.h" />
+ <ClInclude Include="googletest\googletest\include\gtest\gtest_pred_impl.h" />
+ <ClInclude Include="googletest\googletest\include\gtest\gtest_prod.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="googletest\googletest\src\gtest-all.cc">
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/JSImpl/test/gtest.vcxproj.filters b/JSImpl/test/gtest.vcxproj.filters new file mode 100644 index 0000000..3a35c75 --- /dev/null +++ b/JSImpl/test/gtest.vcxproj.filters @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="googletest">
+ <UniqueIdentifier>{E2296FC4-CEE1-B011-37E9-896D23C04B02}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="googletest\googletest">
+ <UniqueIdentifier>{9B66EE6D-07D3-A968-D0C6-41C63CF2CBD0}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="googletest\googletest\src">
+ <UniqueIdentifier>{3FA7DAF5-AB69-0E80-F419-9D0C601BE75D}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="googletest\googletest\include">
+ <UniqueIdentifier>{9B646C1A-077D-5344-D029-E3DD3C01E8DD}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="googletest\googletest\include\gtest">
+ <UniqueIdentifier>{7EFBCD74-EAB4-381F-7314-53F9DFCCEE8E}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="googletest\googletest\include\gtest\gtest-death-test.h">
+ <Filter>googletest\googletest\include\gtest</Filter>
+ </ClInclude>
+ <ClInclude Include="googletest\googletest\include\gtest\gtest-message.h">
+ <Filter>googletest\googletest\include\gtest</Filter>
+ </ClInclude>
+ <ClInclude Include="googletest\googletest\include\gtest\gtest-param-test.h">
+ <Filter>googletest\googletest\include\gtest</Filter>
+ </ClInclude>
+ <ClInclude Include="googletest\googletest\include\gtest\gtest-printers.h">
+ <Filter>googletest\googletest\include\gtest</Filter>
+ </ClInclude>
+ <ClInclude Include="googletest\googletest\include\gtest\gtest-spi.h">
+ <Filter>googletest\googletest\include\gtest</Filter>
+ </ClInclude>
+ <ClInclude Include="googletest\googletest\include\gtest\gtest-test-part.h">
+ <Filter>googletest\googletest\include\gtest</Filter>
+ </ClInclude>
+ <ClInclude Include="googletest\googletest\include\gtest\gtest-typed-test.h">
+ <Filter>googletest\googletest\include\gtest</Filter>
+ </ClInclude>
+ <ClInclude Include="googletest\googletest\include\gtest\gtest.h">
+ <Filter>googletest\googletest\include\gtest</Filter>
+ </ClInclude>
+ <ClInclude Include="googletest\googletest\include\gtest\gtest_pred_impl.h">
+ <Filter>googletest\googletest\include\gtest</Filter>
+ </ClInclude>
+ <ClInclude Include="googletest\googletest\include\gtest\gtest_prod.h">
+ <Filter>googletest\googletest\include\gtest</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="googletest\googletest\src\gtest-all.cc">
+ <Filter>googletest\googletest\src</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
diff --git a/JSImpl/test/gtest_main.vcxproj b/JSImpl/test/gtest_main.vcxproj new file mode 100644 index 0000000..0d93122 --- /dev/null +++ b/JSImpl/test/gtest_main.vcxproj @@ -0,0 +1,125 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{30B03E7E-1C68-80CB-856F-592771461BBC}</ProjectGuid>
+ <RootNamespace>gtest_main</RootNamespace>
+ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <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|x64'">
+ <OutDir>..\build\bin\Debug\</OutDir>
+ <IntDir>..\build\obj\Debug\x64\Debug\gtest_main\</IntDir>
+ <TargetName>gtest_main</TargetName>
+ <TargetExt>.lib</TargetExt>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>..\build\bin\Release\</OutDir>
+ <IntDir>..\build\obj\Release\x64\Release\gtest_main\</IntDir>
+ <TargetName>gtest_main</TargetName>
+ <TargetExt>.lib</TargetExt>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>googletest\googletest;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <PrecompiledHeader></PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <ProgramDataBaseFileName>$(OutDir)gtest_main.pdb</ProgramDataBaseFileName>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>googletest\googletest;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)gtest_main.lib</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)gtest_main.pdb</ProgramDatabaseFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>googletest\googletest;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <PrecompiledHeader></PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <ProgramDataBaseFileName>$(OutDir)gtest_main.pdb</ProgramDataBaseFileName>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions></PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>googletest\googletest;googletest\googletest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Lib>
+ <OutputFile>$(OutDir)gtest_main.lib</OutputFile>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)gtest_main.pdb</ProgramDatabaseFile>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="googletest\googletest\src\gtest_main.cc">
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/JSImpl/test/gtest_main.vcxproj.filters b/JSImpl/test/gtest_main.vcxproj.filters new file mode 100644 index 0000000..6ed8d96 --- /dev/null +++ b/JSImpl/test/gtest_main.vcxproj.filters @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="googletest">
+ <UniqueIdentifier>{E2296FC4-CEE1-B011-37E9-896D23C04B02}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="googletest\googletest">
+ <UniqueIdentifier>{9B66EE6D-07D3-A968-D0C6-41C63CF2CBD0}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="googletest\googletest\src">
+ <UniqueIdentifier>{3FA7DAF5-AB69-0E80-F419-9D0C601BE75D}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="googletest\googletest\src\gtest_main.cc">
+ <Filter>googletest\googletest\src</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
|
