summaryrefslogtreecommitdiff
path: root/tests/src/CoreMangLib/cti/system/globalization/stringinfo
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/CoreMangLib/cti/system/globalization/stringinfo')
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoCtor1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoCtor2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoEquals.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetHashCode.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetNextTextElement2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetTextElementEnumerator1.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetTextElementEnumerator2.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoLengthInTextElements.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoParseCombiningCharacters.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoString.csproj45
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoctor1.cs77
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoctor2.cs171
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoequals.cs235
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogethashcode.cs104
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogetnexttextelement2.cs267
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogettextelementenumerator1.cs185
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogettextelementenumerator2.cs257
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfolengthintextelements.cs109
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoparsecombiningcharacters.cs166
-rw-r--r--tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfostring.cs184
20 files changed, 0 insertions, 2205 deletions
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoCtor1.csproj b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoCtor1.csproj
deleted file mode 100644
index 153e433336..0000000000
--- a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoCtor1.csproj
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
- <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
- <CLRTestKind>BuildAndRun</CLRTestKind>
- <CLRTestPriority>1</CLRTestPriority>
- </PropertyGroup>
- <!-- Default configurations to help VS understand the configurations -->
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- </PropertyGroup>
- <ItemGroup>
- <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
- <Visible>False</Visible>
- </CodeAnalysisDependentAssemblyPaths>
- </ItemGroup>
- <ItemGroup>
- <!-- Add Compile Object Here -->
- <Compile Include="stringinfoctor1.cs" />
- </ItemGroup>
- <ItemGroup>
- <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
- <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
- </ItemGroup>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
- <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoCtor2.csproj b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoCtor2.csproj
deleted file mode 100644
index b32d70506b..0000000000
--- a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoCtor2.csproj
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
- <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
- <CLRTestKind>BuildAndRun</CLRTestKind>
- <CLRTestPriority>1</CLRTestPriority>
- </PropertyGroup>
- <!-- Default configurations to help VS understand the configurations -->
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- </PropertyGroup>
- <ItemGroup>
- <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
- <Visible>False</Visible>
- </CodeAnalysisDependentAssemblyPaths>
- </ItemGroup>
- <ItemGroup>
- <!-- Add Compile Object Here -->
- <Compile Include="stringinfoctor2.cs" />
- </ItemGroup>
- <ItemGroup>
- <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
- <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
- </ItemGroup>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
- <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoEquals.csproj b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoEquals.csproj
deleted file mode 100644
index 43d549dc8a..0000000000
--- a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoEquals.csproj
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
- <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
- <CLRTestKind>BuildAndRun</CLRTestKind>
- <CLRTestPriority>1</CLRTestPriority>
- </PropertyGroup>
- <!-- Default configurations to help VS understand the configurations -->
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- </PropertyGroup>
- <ItemGroup>
- <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
- <Visible>False</Visible>
- </CodeAnalysisDependentAssemblyPaths>
- </ItemGroup>
- <ItemGroup>
- <!-- Add Compile Object Here -->
- <Compile Include="stringinfoequals.cs" />
- </ItemGroup>
- <ItemGroup>
- <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
- <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
- </ItemGroup>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
- <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetHashCode.csproj b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetHashCode.csproj
deleted file mode 100644
index 2b1ea4a0ff..0000000000
--- a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetHashCode.csproj
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
- <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
- <CLRTestKind>BuildAndRun</CLRTestKind>
- <CLRTestPriority>1</CLRTestPriority>
- </PropertyGroup>
- <!-- Default configurations to help VS understand the configurations -->
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- </PropertyGroup>
- <ItemGroup>
- <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
- <Visible>False</Visible>
- </CodeAnalysisDependentAssemblyPaths>
- </ItemGroup>
- <ItemGroup>
- <!-- Add Compile Object Here -->
- <Compile Include="stringinfogethashcode.cs" />
- </ItemGroup>
- <ItemGroup>
- <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
- <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
- </ItemGroup>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
- <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetNextTextElement2.csproj b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetNextTextElement2.csproj
deleted file mode 100644
index 7e190a857e..0000000000
--- a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetNextTextElement2.csproj
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
- <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
- <CLRTestKind>BuildAndRun</CLRTestKind>
- <CLRTestPriority>1</CLRTestPriority>
- </PropertyGroup>
- <!-- Default configurations to help VS understand the configurations -->
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- </PropertyGroup>
- <ItemGroup>
- <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
- <Visible>False</Visible>
- </CodeAnalysisDependentAssemblyPaths>
- </ItemGroup>
- <ItemGroup>
- <!-- Add Compile Object Here -->
- <Compile Include="stringinfogetnexttextelement2.cs" />
- </ItemGroup>
- <ItemGroup>
- <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
- <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
- </ItemGroup>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
- <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetTextElementEnumerator1.csproj b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetTextElementEnumerator1.csproj
deleted file mode 100644
index f3dbb3dc33..0000000000
--- a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetTextElementEnumerator1.csproj
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
- <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
- <CLRTestKind>BuildAndRun</CLRTestKind>
- <CLRTestPriority>1</CLRTestPriority>
- </PropertyGroup>
- <!-- Default configurations to help VS understand the configurations -->
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- </PropertyGroup>
- <ItemGroup>
- <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
- <Visible>False</Visible>
- </CodeAnalysisDependentAssemblyPaths>
- </ItemGroup>
- <ItemGroup>
- <!-- Add Compile Object Here -->
- <Compile Include="stringinfogettextelementenumerator1.cs" />
- </ItemGroup>
- <ItemGroup>
- <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
- <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
- </ItemGroup>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
- <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetTextElementEnumerator2.csproj b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetTextElementEnumerator2.csproj
deleted file mode 100644
index 62fbca43ea..0000000000
--- a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoGetTextElementEnumerator2.csproj
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
- <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
- <CLRTestKind>BuildAndRun</CLRTestKind>
- <CLRTestPriority>1</CLRTestPriority>
- </PropertyGroup>
- <!-- Default configurations to help VS understand the configurations -->
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- </PropertyGroup>
- <ItemGroup>
- <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
- <Visible>False</Visible>
- </CodeAnalysisDependentAssemblyPaths>
- </ItemGroup>
- <ItemGroup>
- <!-- Add Compile Object Here -->
- <Compile Include="stringinfogettextelementenumerator2.cs" />
- </ItemGroup>
- <ItemGroup>
- <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
- <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
- </ItemGroup>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
- <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoLengthInTextElements.csproj b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoLengthInTextElements.csproj
deleted file mode 100644
index 5fb5e06563..0000000000
--- a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoLengthInTextElements.csproj
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
- <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
- <CLRTestKind>BuildAndRun</CLRTestKind>
- <CLRTestPriority>1</CLRTestPriority>
- </PropertyGroup>
- <!-- Default configurations to help VS understand the configurations -->
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- </PropertyGroup>
- <ItemGroup>
- <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
- <Visible>False</Visible>
- </CodeAnalysisDependentAssemblyPaths>
- </ItemGroup>
- <ItemGroup>
- <!-- Add Compile Object Here -->
- <Compile Include="stringinfolengthintextelements.cs" />
- </ItemGroup>
- <ItemGroup>
- <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
- <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
- </ItemGroup>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
- <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoParseCombiningCharacters.csproj b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoParseCombiningCharacters.csproj
deleted file mode 100644
index 7d30397972..0000000000
--- a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoParseCombiningCharacters.csproj
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
- <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
- <CLRTestKind>BuildAndRun</CLRTestKind>
- <CLRTestPriority>1</CLRTestPriority>
- </PropertyGroup>
- <!-- Default configurations to help VS understand the configurations -->
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- </PropertyGroup>
- <ItemGroup>
- <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
- <Visible>False</Visible>
- </CodeAnalysisDependentAssemblyPaths>
- </ItemGroup>
- <ItemGroup>
- <!-- Add Compile Object Here -->
- <Compile Include="stringinfoparsecombiningcharacters.cs" />
- </ItemGroup>
- <ItemGroup>
- <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
- <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
- </ItemGroup>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
- <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoString.csproj b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoString.csproj
deleted file mode 100644
index 494784f20e..0000000000
--- a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/StringInfoString.csproj
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
- <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <ReferenceLocalMscorlib>false</ReferenceLocalMscorlib>
- <CLRTestKind>BuildAndRun</CLRTestKind>
- <CLRTestPriority>1</CLRTestPriority>
- </PropertyGroup>
- <!-- Default configurations to help VS understand the configurations -->
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- </PropertyGroup>
- <ItemGroup>
- <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
- <Visible>False</Visible>
- </CodeAnalysisDependentAssemblyPaths>
- </ItemGroup>
- <ItemGroup>
- <!-- Add Compile Object Here -->
- <Compile Include="stringinfostring.cs" />
- </ItemGroup>
- <ItemGroup>
- <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
- <ProjectReference Include="../../../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
- </ItemGroup>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
- <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoctor1.cs b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoctor1.cs
deleted file mode 100644
index edd16c04d9..0000000000
--- a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoctor1.cs
+++ /dev/null
@@ -1,77 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-using System;
-using System.Globalization;
-
-/// <summary>
-/// System.Globalization.StringInfo.Ctor
-/// </summary>
-public class StringInfoCtor1
-{
- #region Public Methods
- public bool RunTests()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.LogInformation("[Positive]");
- retVal = PosTest1() && retVal;
-
- return retVal;
- }
-
- #region Positive Test Cases
- public bool PosTest1()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest1: Call constructor to create an instance");
-
- try
- {
- StringInfo stringInfo = new StringInfo();
- if (stringInfo == null)
- {
- TestLibrary.TestFramework.LogError("001", "The constructor does not create a new instance");
- retVal = false;
- }
- if (stringInfo.String != string.Empty)
- {
- TestLibrary.TestFramework.LogError("002", "The constructor does not work correctly");
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
- #endregion
-
- #region Nagetive Test Cases
- #endregion
- #endregion
-
- public static int Main()
- {
- StringInfoCtor1 test = new StringInfoCtor1();
-
- TestLibrary.TestFramework.BeginTestCase("StringInfoCtor1");
-
- if (test.RunTests())
- {
- TestLibrary.TestFramework.EndTestCase();
- TestLibrary.TestFramework.LogInformation("PASS");
- return 100;
- }
- else
- {
- TestLibrary.TestFramework.EndTestCase();
- TestLibrary.TestFramework.LogInformation("FAIL");
- return 0;
- }
- }
-}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoctor2.cs b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoctor2.cs
deleted file mode 100644
index 09a1344117..0000000000
--- a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoctor2.cs
+++ /dev/null
@@ -1,171 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-using System;
-using System.Globalization;
-
-/// <summary>
-/// System.Globalization.StringInfo.Ctor(System.String)
-/// </summary>
-public class StringInfoCtor2
-{
- private const int c_MINI_STRING_LENGTH = 8;
- private const int c_MAX_STRING_LENGTH = 256;
-
- #region Public Methods
- public bool RunTests()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.LogInformation("[Positive]");
- retVal = PosTest1() && retVal;
- retVal = PosTest2() && retVal;
- retVal = PosTest3() && retVal;
-
- TestLibrary.TestFramework.LogInformation("[Negative]");
- retVal = NegTest1() && retVal;
-
- return retVal;
- }
-
- #region Positive Test Cases
- public bool PosTest1()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest1: Call constructor to create an instance with a random string argument");
-
- try
- {
- string str = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
- StringInfo stringInfo = new StringInfo(str);
- if (stringInfo == null)
- {
- TestLibrary.TestFramework.LogError("001", "The constructor does not create a new instance");
- retVal = false;
- }
- if (stringInfo.String != str)
- {
- TestLibrary.TestFramework.LogError("002", "The constructor does not work correctly,the str is: " + str);
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("003", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool PosTest2()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest2: Call constructor to create an instance with an empty string argument");
-
- try
- {
- string str = string.Empty;
- StringInfo stringInfo = new StringInfo(str);
- if (stringInfo == null)
- {
- TestLibrary.TestFramework.LogError("004", "The constructor does not create a new instance");
- retVal = false;
- }
- if (stringInfo.String != string.Empty)
- {
- TestLibrary.TestFramework.LogError("005", "The constructor does not work correctly,the str is: " + str);
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool PosTest3()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest3: Call constructor to create an instance with a string of white space");
-
- try
- {
- string str = " ";
- StringInfo stringInfo = new StringInfo(str);
- if (stringInfo == null)
- {
- TestLibrary.TestFramework.LogError("007", "The constructor does not create a new instance");
- retVal = false;
- }
- if (stringInfo.String != " ")
- {
- TestLibrary.TestFramework.LogError("008", "The constructor does not work correctly,the str is: " + str);
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
- #endregion
-
- #region Nagetive Test Cases
- public bool NegTest1()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("NegTest1: The string is a null reference");
-
- try
- {
- string str = null;
- StringInfo stringInfo = new StringInfo(str);
- TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
- retVal = false;
- }
- catch (ArgumentNullException)
- {
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
- TestLibrary.TestFramework.LogInformation(e.StackTrace);
- retVal = false;
- }
-
- return retVal;
- }
- #endregion
- #endregion
-
- public static int Main()
- {
- StringInfoCtor2 test = new StringInfoCtor2();
-
- TestLibrary.TestFramework.BeginTestCase("StringInfoCtor2");
-
- if (test.RunTests())
- {
- TestLibrary.TestFramework.EndTestCase();
- TestLibrary.TestFramework.LogInformation("PASS");
- return 100;
- }
- else
- {
- TestLibrary.TestFramework.EndTestCase();
- TestLibrary.TestFramework.LogInformation("FAIL");
- return 0;
- }
- }
-}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoequals.cs b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoequals.cs
deleted file mode 100644
index 4866c64f17..0000000000
--- a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoequals.cs
+++ /dev/null
@@ -1,235 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-using System;
-using System.Globalization;
-
-/// <summary>
-/// System.Globalization.StringInfo.Equals(Object)
-/// </summary>
-public class StringInfoEquals
-{
- private const int c_MINI_STRING_LENGTH = 8;
- private const int c_MAX_STRING_LENGTH = 256;
-
-
- #region Public Methods
- public bool RunTests()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.LogInformation("[Positive]");
- retVal = PosTest1() && retVal;
- retVal = PosTest2() && retVal;
- retVal = PosTest3() && retVal;
- retVal = PosTest4() && retVal;
- retVal = PosTest5() && retVal;
- retVal = PosTest6() && retVal;
- retVal = PosTest7() && retVal;
-
- return retVal;
- }
-
- #region Positive Test Cases
- public bool PosTest1()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest1: Compare two equal StringInfo");
-
- try
- {
- string str = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
- StringInfo stringInfo1 = new StringInfo(str);
- StringInfo stringInfo2 = new StringInfo(str);
- if (!stringInfo1.Equals(stringInfo2))
- {
- TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool PosTest2()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest2: The two stringinfos reference to one object ");
-
- try
- {
- string str = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
- StringInfo stringInfo1 = new StringInfo(str);
- StringInfo stringInfo2 = stringInfo1;
- if (!stringInfo1.Equals(stringInfo2))
- {
- TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool PosTest3()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest3: Using default constructor to create two equal instance");
-
- try
- {
- StringInfo stringInfo1 = new StringInfo();
- StringInfo stringInfo2 = new StringInfo();
- if (!stringInfo1.Equals(stringInfo2))
- {
- TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool PosTest4()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest4: Compare two instance with different string value");
-
- try
- {
- StringInfo stringInfo1 = new StringInfo("stringinfo1");
- StringInfo stringInfo2 = new StringInfo("stringinfo2");
- if (stringInfo1.Equals(stringInfo2))
- {
- TestLibrary.TestFramework.LogError("007", "The result is not the value as expected");
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool PosTest5()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest5: Compare with a different kind of type");
-
- try
- {
- StringInfo stringInfo1 = new StringInfo("stringinfo1");
- string str = "stringinfo1";
- if (stringInfo1.Equals(str))
- {
- TestLibrary.TestFramework.LogError("009", "The result is not the value as expected");
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool PosTest6()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest6: The argument is a null reference");
-
- try
- {
- StringInfo stringInfo1 = new StringInfo("stringinfo1");
- object ob = null;
- if (stringInfo1.Equals(ob))
- {
- TestLibrary.TestFramework.LogError("011", "The result is not the value as expected");
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("012", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool PosTest7()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest7: The argument is value type");
-
- try
- {
- StringInfo stringInfo1 = new StringInfo("123");
- int i = 123;
- if (stringInfo1.Equals(i))
- {
- TestLibrary.TestFramework.LogError("013", "The result is not the value as expected");
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("014", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
- #endregion
-
- #region Nagetive Test Cases
- #endregion
- #endregion
-
- public static int Main()
- {
- StringInfoEquals test = new StringInfoEquals();
-
- TestLibrary.TestFramework.BeginTestCase("StringInfoEquals");
-
- if (test.RunTests())
- {
- TestLibrary.TestFramework.EndTestCase();
- TestLibrary.TestFramework.LogInformation("PASS");
- return 100;
- }
- else
- {
- TestLibrary.TestFramework.EndTestCase();
- TestLibrary.TestFramework.LogInformation("FAIL");
- return 0;
- }
- }
-}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogethashcode.cs b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogethashcode.cs
deleted file mode 100644
index 89b7bb45cc..0000000000
--- a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogethashcode.cs
+++ /dev/null
@@ -1,104 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-using System;
-using System.Globalization;
-
-/// <summary>
-/// System.Globalization.StringInfo.GetHashCode()
-/// </summary>
-public class StringInfoGetHashCode
-{
- private const int c_MINI_STRING_LENGTH = 8;
- private const int c_MAX_STRING_LENGTH = 256;
-
- #region Public Methods
- public bool RunTests()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.LogInformation("[Positive]");
- retVal = PosTest1() && retVal;
- retVal = PosTest2() && retVal;
-
- return retVal;
- }
-
- #region Positive Test Cases
- public bool PosTest1()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest1: The two instances created by the same argument return the same hashcode");
-
- try
- {
- string str = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
- StringInfo stringInfo1 = new StringInfo(str);
- StringInfo stringInfo2 = new StringInfo(str);
- if (stringInfo1.GetHashCode() != stringInfo2.GetHashCode())
- {
- TestLibrary.TestFramework.LogError("001", "The result is not the value as expected");
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool PosTest2()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest2: Check two different instance");
-
- try
- {
- string str = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
- StringInfo stringInfo1 = new StringInfo(str);
- StringInfo stringInfo2 = new StringInfo("");
- if (stringInfo1.GetHashCode() == stringInfo2.GetHashCode())
- {
- TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
- #endregion
-
- #region Nagetive Test Cases
- #endregion
- #endregion
-
- public static int Main()
- {
- StringInfoGetHashCode test = new StringInfoGetHashCode();
-
- TestLibrary.TestFramework.BeginTestCase("StringInfoGetHashCode");
-
- if (test.RunTests())
- {
- TestLibrary.TestFramework.EndTestCase();
- TestLibrary.TestFramework.LogInformation("PASS");
- return 100;
- }
- else
- {
- TestLibrary.TestFramework.EndTestCase();
- TestLibrary.TestFramework.LogInformation("FAIL");
- return 0;
- }
- }
-}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogetnexttextelement2.cs b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogetnexttextelement2.cs
deleted file mode 100644
index 7f323d0707..0000000000
--- a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogetnexttextelement2.cs
+++ /dev/null
@@ -1,267 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-using System;
-using System.Globalization;
-
-/// <summary>
-/// System.Globalization.StringInfo.GetNextTestElement(string,int32)
-/// </summary>
-public class StringInfoGetNextTextElement2
-{
- private const int c_MINI_STRING_LENGTH = 8;
- private const int c_MAX_STRING_LENGTH = 256;
-
- #region Public Methods
- public bool RunTests()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.LogInformation("[Positive]");
- retVal = PosTest1() && retVal;
- retVal = PosTest2() && retVal;
- retVal = PosTest3() && retVal;
- retVal = PosTest4() && retVal;
-
- TestLibrary.TestFramework.LogInformation("[Negative]");
- retVal = NegTest1() && retVal;
- retVal = NegTest2() && retVal;
- retVal = NegTest3() && retVal;
-
- return retVal;
- }
-
- #region Positive Test Cases
- public bool PosTest1()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest1: Get the text element from a random index in a string");
-
- try
- {
- string str = TestLibrary.Generator.GetString(-55, true, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
- int index = this.GetInt32(8, str.Length);
- string result = StringInfo.GetNextTextElement(str, index);
- if (result != str[index].ToString())
- {
- TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,the result is: " + result);
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool PosTest2()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest2: The first element is a surrogate pair");
-
- try
- {
- string str = "\uDBFF\uDFFF";
- string result = StringInfo.GetNextTextElement("ef45-;\uDBFF\uDFFFabcde", 6);
- if (result.Length != 2)
- {
- TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
- retVal = false;
- }
- if (result != str)
- {
- TestLibrary.TestFramework.LogError("004", "The result is not the value as expected,the result is: " + result);
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool PosTest3()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest3: The element is a combining character");
-
- try
- {
- string str = "a\u20D1";
- string result = StringInfo.GetNextTextElement("13229^a\u20D1abcde", 6);
- if (result != str)
- {
- TestLibrary.TestFramework.LogError("006", "The result is not the value as expected,the result is: " + result);
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("007", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool PosTest4()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest4: The element is a combination of base character and several combining characters");
-
- try
- {
- string str = "z\uFE22\u20D1\u20EB";
- string result = StringInfo.GetNextTextElement("az\uFE22\u20D1\u20EBabcde", 1);
- if (result.Length != 4)
- {
- TestLibrary.TestFramework.LogError("008", "The result is not the value as expected,length is: " + result.Length);
- retVal = false;
- }
- if (result != str)
- {
- TestLibrary.TestFramework.LogError("009", "The result is not the value as expected,the result is: " + result);
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("010", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
- #endregion
-
- #region Nagetive Test Cases
- public bool NegTest1()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("NegTest1: The string is a null reference");
-
- try
- {
- string str = null;
- string result = StringInfo.GetNextTextElement(str, 0);
- TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
- retVal = false;
- }
- catch (ArgumentNullException)
- {
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
- TestLibrary.TestFramework.LogInformation(e.StackTrace);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool NegTest2()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("NegTest2: The index is out of the range of the string");
-
- try
- {
- string str = "abc";
- string result = StringInfo.GetNextTextElement(str, -4);
- TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException was not thrown as expected");
- retVal = false;
- }
- catch (ArgumentOutOfRangeException)
- {
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
- TestLibrary.TestFramework.LogInformation(e.StackTrace);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool NegTest3()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("NegTest3: The index is a negative number");
-
- try
- {
- string str = "df8%^dk";
- string result = StringInfo.GetNextTextElement(str, -1);
- TestLibrary.TestFramework.LogError("105", "The ArgumentOutOfRangeException was not thrown as expected");
- retVal = false;
- }
- catch (ArgumentOutOfRangeException)
- {
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
- TestLibrary.TestFramework.LogInformation(e.StackTrace);
- retVal = false;
- }
-
- return retVal;
- }
- #endregion
- #endregion
-
- public static int Main()
- {
- StringInfoGetNextTextElement2 test = new StringInfoGetNextTextElement2();
-
- TestLibrary.TestFramework.BeginTestCase("StringInfoGetNextTextElement2");
-
- if (test.RunTests())
- {
- TestLibrary.TestFramework.EndTestCase();
- TestLibrary.TestFramework.LogInformation("PASS");
- return 100;
- }
- else
- {
- TestLibrary.TestFramework.EndTestCase();
- TestLibrary.TestFramework.LogInformation("FAIL");
- return 0;
- }
- }
- private Int32 GetInt32(Int32 minValue, Int32 maxValue)
- {
- try
- {
- if (minValue == maxValue)
- {
- return minValue;
- }
- if (minValue < maxValue)
- {
- return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
- }
- }
- catch
- {
- throw;
- }
-
- return minValue;
- }
-}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogettextelementenumerator1.cs b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogettextelementenumerator1.cs
deleted file mode 100644
index 5b7fe1c42c..0000000000
--- a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogettextelementenumerator1.cs
+++ /dev/null
@@ -1,185 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-using System;
-using System.Globalization;
-
-/// <summary>
-/// System.Globalization.StringInfo.GetTestElementEnumerator(string)
-/// </summary>
-public class StringInfoGetTextElementEnumerator1
-{
- private const int c_MINI_STRING_LENGTH = 8;
- private const int c_MAX_STRING_LENGTH = 256;
-
- #region Public Methods
- public bool RunTests()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.LogInformation("[Positive]");
- retVal = PosTest1() && retVal;
- retVal = PosTest2() && retVal;
- retVal = PosTest3() && retVal;
-
- TestLibrary.TestFramework.LogInformation("[Negative]");
- retVal = NegTest1() && retVal;
-
- return retVal;
- }
-
- #region Positive Test Cases
- public bool PosTest1()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest1: The argument is a random string");
-
- try
- {
- string str = TestLibrary.Generator.GetString(-55, true, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
- TextElementEnumerator TextElementEnumerator = StringInfo.GetTextElementEnumerator(str);
- int len = str.Length;
- TextElementEnumerator.MoveNext();
- for (int i = 0; i < len; i++)
- {
- if (TextElementEnumerator.Current.ToString() != str[i].ToString())
- {
- TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,the str[i] is: " + str[i]);
- retVal = false;
- }
- TextElementEnumerator.MoveNext();
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool PosTest2()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest2: The string has a surrogate pair");
-
- try
- {
- string str = "\uDBFF\uDFFF";
- TextElementEnumerator TextElementEnumerator = StringInfo.GetTextElementEnumerator("s\uDBFF\uDFFF$");
- TextElementEnumerator.MoveNext();
- if (TextElementEnumerator.Current.ToString() != "s")
- {
- TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
- retVal = false;
- }
- TextElementEnumerator.MoveNext();
- if (TextElementEnumerator.Current.ToString() != str)
- {
- TestLibrary.TestFramework.LogError("004", "The result is not the value as expected,the current is: " + TextElementEnumerator.Current.ToString());
- retVal = false;
- }
- TextElementEnumerator.MoveNext();
- if (TextElementEnumerator.Current.ToString() != "$")
- {
- TestLibrary.TestFramework.LogError("005", "The result is not the value as expected");
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool PosTest3()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest3: The string has a combining character");
-
- try
- {
- string str = "a\u20D1";
- TextElementEnumerator TextElementEnumerator = StringInfo.GetTextElementEnumerator("13229^a\u20D1a");
- for (int i = 0; i < 7; i++)
- {
- TextElementEnumerator.MoveNext();
- }
- if (TextElementEnumerator.Current.ToString() != str)
- {
- TestLibrary.TestFramework.LogError("007", "The result is not the value as expected,the current is: " + TextElementEnumerator.Current.ToString());
- retVal = false;
- }
- TextElementEnumerator.MoveNext();
- if (TextElementEnumerator.MoveNext())
- {
- TestLibrary.TestFramework.LogError("008", "The result is not the value as expected,the current is: " + TextElementEnumerator.Current.ToString());
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
- #endregion
-
- #region Nagetive Test Cases
- public bool NegTest1()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("NegTest1: The string is a null reference");
-
- try
- {
- string str = null;
- TextElementEnumerator TextElementEnumerator = StringInfo.GetTextElementEnumerator(str);
- TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
- retVal = false;
- }
- catch (ArgumentNullException)
- {
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
- TestLibrary.TestFramework.LogInformation(e.StackTrace);
- retVal = false;
- }
-
- return retVal;
- }
- #endregion
- #endregion
-
- public static int Main()
- {
- StringInfoGetTextElementEnumerator1 test = new StringInfoGetTextElementEnumerator1();
-
- TestLibrary.TestFramework.BeginTestCase("StringInfoGetTextElementEnumerator1");
-
- if (test.RunTests())
- {
- TestLibrary.TestFramework.EndTestCase();
- TestLibrary.TestFramework.LogInformation("PASS");
- return 100;
- }
- else
- {
- TestLibrary.TestFramework.EndTestCase();
- TestLibrary.TestFramework.LogInformation("FAIL");
- return 0;
- }
- }
-}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogettextelementenumerator2.cs b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogettextelementenumerator2.cs
deleted file mode 100644
index aeb9a27c44..0000000000
--- a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfogettextelementenumerator2.cs
+++ /dev/null
@@ -1,257 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-using System;
-using System.Globalization;
-
-/// <summary>
-/// System.Globalization.StringInfo.GetTestElementEnumerator(string,Int32)
-/// </summary>
-public class StringInfoGetTextElementEnumerator2
-{
- private const int c_MINI_STRING_LENGTH = 8;
- private const int c_MAX_STRING_LENGTH = 256;
-
- #region Public Methods
- public bool RunTests()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.LogInformation("[Positive]");
- retVal = PosTest1() && retVal;
- retVal = PosTest2() && retVal;
- retVal = PosTest3() && retVal;
-
- TestLibrary.TestFramework.LogInformation("[Negative]");
- retVal = NegTest1() && retVal;
- retVal = NegTest2() && retVal;
- retVal = NegTest3() && retVal;
-
- return retVal;
- }
-
- #region Positive Test Cases
- public bool PosTest1()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest1: The argument is a random string,and start at a random index");
-
- try
- {
- string str = TestLibrary.Generator.GetString(-55, true, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
- int len = str.Length;
- int index = this.GetInt32(8, len);
- TextElementEnumerator TextElementEnumerator = StringInfo.GetTextElementEnumerator(str, index);
- TextElementEnumerator.MoveNext();
- for (int i = 0; i < len - index; i++)
- {
- if (TextElementEnumerator.Current.ToString() != str[i + index].ToString())
- {
- TestLibrary.TestFramework.LogError("001", "The result is not the value as expected,the str is: " + str[i + index]);
- retVal = false;
- }
- TextElementEnumerator.MoveNext();
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool PosTest2()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest2: The string has a surrogate pair");
-
- try
- {
- string str = "\uDBFF\uDFFF";
- TextElementEnumerator TextElementEnumerator = StringInfo.GetTextElementEnumerator("s\uDBFF\uDFFF$", 1);
- TextElementEnumerator.MoveNext();
- if (TextElementEnumerator.Current.ToString() != str)
- {
- TestLibrary.TestFramework.LogError("003", "The result is not the value as expected,the current is: " + TextElementEnumerator.Current.ToString());
- retVal = false;
- }
- TextElementEnumerator.MoveNext();
- if (TextElementEnumerator.Current.ToString() != "$")
- {
- TestLibrary.TestFramework.LogError("004", "The result is not the value as expected");
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool PosTest3()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest3: The string has a combining character");
-
- try
- {
- string str = "a\u20D1";
- TextElementEnumerator TextElementEnumerator = StringInfo.GetTextElementEnumerator("13229^a\u20D1a", 6);
- TextElementEnumerator.MoveNext();
- if (TextElementEnumerator.Current.ToString() != str)
- {
- TestLibrary.TestFramework.LogError("006", "The result is not the value as expected,the current is: " + TextElementEnumerator.Current.ToString());
- retVal = false;
- }
- TextElementEnumerator.MoveNext();
- if (TextElementEnumerator.Current.ToString() != "a")
- {
- TestLibrary.TestFramework.LogError("007", "The result is not the value as expected,the current is: " + TextElementEnumerator.Current.ToString());
- retVal = false;
- }
- if (TextElementEnumerator.MoveNext())
- {
- TestLibrary.TestFramework.LogError("008", "The result is not the value as expected,the current is: " + TextElementEnumerator.Current.ToString());
- retVal = false;
- }
-
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("009", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
- #endregion
-
- #region Nagetive Test Cases
- public bool NegTest1()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("NegTest1: The string is a null reference");
-
- try
- {
- string str = null;
- TextElementEnumerator TextElementEnumerator = StringInfo.GetTextElementEnumerator(str, 0);
- TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
- retVal = false;
- }
- catch (ArgumentNullException)
- {
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
- TestLibrary.TestFramework.LogInformation(e.StackTrace);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool NegTest2()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("NegTest2: The index is out of the range of the string");
-
- try
- {
- string str = "dur8&p!";
- TextElementEnumerator TextElementEnumerator = StringInfo.GetTextElementEnumerator(str, 10);
- TestLibrary.TestFramework.LogError("103", "The ArgumentOutOfRangeException was not thrown as expected");
- retVal = false;
- }
- catch (ArgumentOutOfRangeException)
- {
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("104", "Unexpected exception: " + e);
- TestLibrary.TestFramework.LogInformation(e.StackTrace);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool NegTest3()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("NegTest3: The index is a negative number");
-
- try
- {
- string str = "dur8&p!";
- TextElementEnumerator TextElementEnumerator = StringInfo.GetTextElementEnumerator(str, -10);
- TestLibrary.TestFramework.LogError("105", "The ArgumentOutOfRangeException was not thrown as expected");
- retVal = false;
- }
- catch (ArgumentOutOfRangeException)
- {
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("106", "Unexpected exception: " + e);
- TestLibrary.TestFramework.LogInformation(e.StackTrace);
- retVal = false;
- }
-
- return retVal;
- }
- #endregion
- #endregion
-
- public static int Main()
- {
- StringInfoGetTextElementEnumerator2 test = new StringInfoGetTextElementEnumerator2();
-
- TestLibrary.TestFramework.BeginTestCase("StringInfoGetTextElementEnumerator2");
-
- if (test.RunTests())
- {
- TestLibrary.TestFramework.EndTestCase();
- TestLibrary.TestFramework.LogInformation("PASS");
- return 100;
- }
- else
- {
- TestLibrary.TestFramework.EndTestCase();
- TestLibrary.TestFramework.LogInformation("FAIL");
- return 0;
- }
- }
- private Int32 GetInt32(Int32 minValue, Int32 maxValue)
- {
- try
- {
- if (minValue == maxValue)
- {
- return minValue;
- }
- if (minValue < maxValue)
- {
- return minValue + TestLibrary.Generator.GetInt32(-55) % (maxValue - minValue);
- }
- }
- catch
- {
- throw;
- }
-
- return minValue;
- }
-}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfolengthintextelements.cs b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfolengthintextelements.cs
deleted file mode 100644
index 95e298787f..0000000000
--- a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfolengthintextelements.cs
+++ /dev/null
@@ -1,109 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-using System;
-using System.Globalization;
-
-/// <summary>
-/// System.Globalization.StringInfo.LengthInTextElements
-/// </summary>
-public class StringInfoLengthInTextElements
-{
- #region Public Methods
- public bool RunTests()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.LogInformation("[Positive]");
- retVal = PosTest1() && retVal;
- retVal = PosTest2() && retVal;
-
- return retVal;
- }
-
- #region Positive Test Cases
- public bool PosTest1()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest1: The mothod should return the number of base character in the current stringInfo object");
-
- try
- {
- retVal = VerificationHelper("\u4f00\u302a\ud800\udc00\u4f01", 3, "001.1");
- retVal = VerificationHelper("abcdefgh", 8, "001.2");
- retVal = VerificationHelper("zj\uDBFF\uDFFFlk", 5, "001.3");
- retVal = VerificationHelper("!@#$%^&", 7, "001.4");
- retVal = VerificationHelper("!\u20D1bo\uFE22\u20D1\u20EB|", 4, "001.5");
- retVal = VerificationHelper("1\uDBFF\uDFFF@\uFE22\u20D1\u20EB9", 4, "001.6");
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool PosTest2()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest2: The string in stringinfo is white space or empty string");
-
- try
- {
- retVal = VerificationHelper(" ", 3, "001.1");
- retVal = VerificationHelper(string.Empty, 0, "001.2");
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
- #endregion
-
- #region Nagetive Test Cases
- #endregion
- #endregion
-
- public static int Main()
- {
- StringInfoLengthInTextElements test = new StringInfoLengthInTextElements();
-
- TestLibrary.TestFramework.BeginTestCase("StringInfoLengthInTextElements");
-
- if (test.RunTests())
- {
- TestLibrary.TestFramework.EndTestCase();
- TestLibrary.TestFramework.LogInformation("PASS");
- return 100;
- }
- else
- {
- TestLibrary.TestFramework.EndTestCase();
- TestLibrary.TestFramework.LogInformation("FAIL");
- return 0;
- }
- }
- #region Private Methods
- private bool VerificationHelper(string str, int expected, string errorno)
- {
- bool retVal = true;
-
- StringInfo stringInfo = new StringInfo(str);
- int result = stringInfo.LengthInTextElements;
- if (result != expected)
- {
- TestLibrary.TestFramework.LogError(errorno, "The result is not the value as expected,The actual is: " + result + ", the desire is: " + expected);
- retVal = false;
- }
-
- return retVal;
- }
- #endregion
-}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoparsecombiningcharacters.cs b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoparsecombiningcharacters.cs
deleted file mode 100644
index 9fbbe76037..0000000000
--- a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfoparsecombiningcharacters.cs
+++ /dev/null
@@ -1,166 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-using System;
-using System.Globalization;
-
-/// <summary>
-/// System.Globalization.StringInfo.ParseCombiningCharacters(System.String)
-/// </summary>
-public class StringInfoParseCombiningCharacters
-{
- #region Public Methods
- public bool RunTests()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.LogInformation("[Positive]");
- retVal = PosTest1() && retVal;
- retVal = PosTest2() && retVal;
-
- TestLibrary.TestFramework.LogInformation("[Negative]");
- retVal = NegTest1() && retVal;
-
- return retVal;
- }
-
- #region Positive Test Cases
- public bool PosTest1()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest1: The mothod should return the indexes of each base character");
-
- try
- {
- retVal = VerificationHelper("\u4f00\u302a\ud800\udc00\u4f01", new int[] { 0, 2, 4 }, "001.1");
- retVal = VerificationHelper("abcdefgh", new int[] { 0, 1, 2, 3, 4, 5, 6, 7 }, "001.2");
- retVal = VerificationHelper("zj\uDBFF\uDFFFlk", new int[] { 0, 1, 2, 4, 5 }, "001.3");
- retVal = VerificationHelper("!@#$%^&", new int[] { 0, 1, 2, 3, 4, 5, 6 }, "001.4");
- retVal = VerificationHelper("!\u20D1bo\uFE22\u20D1\u20EB|", new int[] { 0, 2, 3, 7 }, "001.5");
- retVal = VerificationHelper("1\uDBFF\uDFFF@\uFE22\u20D1\u20EB9", new int[] { 0, 1, 3, 7 }, "001.6");
- retVal = VerificationHelper(" ", new int[] { 0, 1, 2 }, "001.7");
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool PosTest2()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest2: The argument string is an empty string");
-
- try
- {
- int[] result = StringInfo.ParseCombiningCharacters(string.Empty);
- if (result == null)
- {
- TestLibrary.TestFramework.LogError("003", "The result is not the value as expected");
- retVal = false;
- }
- if (result.Length != 0)
- {
- TestLibrary.TestFramework.LogError("004", "The result is not the value as expected");
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("005", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
- #endregion
-
- #region Nagetive Test Cases
- public bool NegTest1()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("NegTest1: The argument string is a null reference");
-
- try
- {
- string str = null;
- int[] result = StringInfo.ParseCombiningCharacters(str);
- TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
- retVal = false;
- }
- catch (ArgumentNullException)
- {
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
- TestLibrary.TestFramework.LogInformation(e.StackTrace);
- retVal = false;
- }
-
- return retVal;
- }
- #endregion
- #endregion
-
- public static int Main()
- {
- StringInfoParseCombiningCharacters test = new StringInfoParseCombiningCharacters();
-
- TestLibrary.TestFramework.BeginTestCase("StringInfoParseCombiningCharacters");
-
- if (test.RunTests())
- {
- TestLibrary.TestFramework.EndTestCase();
- TestLibrary.TestFramework.LogInformation("PASS");
- return 100;
- }
- else
- {
- TestLibrary.TestFramework.EndTestCase();
- TestLibrary.TestFramework.LogInformation("FAIL");
- return 0;
- }
- }
- #region Private Methods
- private bool VerificationHelper(string str, int[] expected, string errorno)
- {
- bool retVal = true;
-
- int[] result = StringInfo.ParseCombiningCharacters(str);
-
- if (!compare<int>(result, expected))
- {
- TestLibrary.TestFramework.LogError(errorno, "The result is not the value as expected");
- retVal = false;
- }
-
- return retVal;
- }
-
- private bool compare<T>(T[] a, T[] b)
- {
- if (a.Length != b.Length)
- {
- return false;
- }
- else
- {
- for (int i = 0; i < a.Length; i++)
- {
- if (!a[i].Equals(b[i]))
- {
- return false;
- }
- }
- return true;
- }
- }
- #endregion
-}
diff --git a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfostring.cs b/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfostring.cs
deleted file mode 100644
index 0656a630ad..0000000000
--- a/tests/src/CoreMangLib/cti/system/globalization/stringinfo/stringinfostring.cs
+++ /dev/null
@@ -1,184 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-using System;
-using System.Globalization;
-
-/// <summary>
-/// System.Globalization.StringInfo.string
-/// </summary>
-public class StringInfoString
-{
- private const int c_MINI_STRING_LENGTH = 8;
- private const int c_MAX_STRING_LENGTH = 256;
-
- #region Public Methods
- public bool RunTests()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.LogInformation("[Positive]");
- retVal = PosTest1() && retVal;
- retVal = PosTest2() && retVal;
- retVal = PosTest3() && retVal;
- retVal = PosTest4() && retVal;
-
- TestLibrary.TestFramework.LogInformation("[Negative]");
- retVal = NegTest1() && retVal;
-
- return retVal;
- }
-
- #region Positive Test Cases
- public bool PosTest1()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest1: The string property in stringinfo object is a random string argument");
-
- try
- {
- string str = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
- StringInfo stringInfo = new StringInfo(str);
- if (stringInfo.String != str)
- {
- TestLibrary.TestFramework.LogError("001", "The constructor does not work correctly,the str is: " + str);
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("002", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool PosTest2()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest2: The string property in stringinfo object is an empty string argument");
-
- try
- {
- string str = string.Empty;
- StringInfo stringInfo = new StringInfo(str);
- if (stringInfo.String != string.Empty)
- {
- TestLibrary.TestFramework.LogError("003", "The constructor does not work correctly,the str is: " + str);
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("004", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool PosTest3()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest3: Check an instance with a string of white space");
-
- try
- {
- string str = " ";
- StringInfo stringInfo = new StringInfo(str);
- if (stringInfo.String != " ")
- {
- TestLibrary.TestFramework.LogError("005", "The constructor does not work correctly,the str is: " + str);
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("006", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
-
- public bool PosTest4()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("PosTest4: Set the property with a random string value");
-
- try
- {
- string str = TestLibrary.Generator.GetString(-55, false, c_MINI_STRING_LENGTH, c_MAX_STRING_LENGTH);
- StringInfo stringInfo = new StringInfo();
- stringInfo.String = str;
- if (stringInfo.String != str)
- {
- TestLibrary.TestFramework.LogError("007", "The constructor does not work correctly,the str is: " + str);
- retVal = false;
- }
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("008", "Unexpected exception: " + e);
- retVal = false;
- }
-
- return retVal;
- }
- #endregion
-
- #region Nagetive Test Cases
- public bool NegTest1()
- {
- bool retVal = true;
-
- TestLibrary.TestFramework.BeginScenario("NegTest1: The property was set with a value of null");
-
- try
- {
- string str = null;
- StringInfo stringInfo = new StringInfo();
- stringInfo.String = str;
- TestLibrary.TestFramework.LogError("101", "The ArgumentNullException was not thrown as expected");
- retVal = false;
- }
- catch (ArgumentNullException)
- {
- }
- catch (Exception e)
- {
- TestLibrary.TestFramework.LogError("102", "Unexpected exception: " + e);
- TestLibrary.TestFramework.LogInformation(e.StackTrace);
- retVal = false;
- }
-
- return retVal;
- }
- #endregion
- #endregion
-
- public static int Main()
- {
- StringInfoString test = new StringInfoString();
-
- TestLibrary.TestFramework.BeginTestCase("StringInfoString");
-
- if (test.RunTests())
- {
- TestLibrary.TestFramework.EndTestCase();
- TestLibrary.TestFramework.LogInformation("PASS");
- return 100;
- }
- else
- {
- TestLibrary.TestFramework.EndTestCase();
- TestLibrary.TestFramework.LogInformation("FAIL");
- return 0;
- }
- }
-}