summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2022-01-06 15:30:02 +0100
committerRoland Reichwein <mail@reichwein.it>2022-01-06 15:30:02 +0100
commit69e14c9f3a9fe35a80a22f121969cef914ede063 (patch)
treeeb6f78e0e28119ff8d757b794344bc55a01bb1c1
parentfceee089c114e8510fd1e7f06f258b5d67cf23bf (diff)
Adjustments for msbuild
-rw-r--r--msbuild/libunicode.vcxproj13
-rw-r--r--msbuild/libunicode.vcxproj.filters41
-rw-r--r--msbuild/test-performance.vcxproj5
-rw-r--r--msbuild/test-performance.vcxproj.filters7
-rw-r--r--msbuild/test-unicode.vcxproj5
-rw-r--r--msbuild/test-unicode.vcxproj.filters7
-rw-r--r--src/test-helper.cpp25
-rw-r--r--src/test-helper.h6
8 files changed, 105 insertions, 4 deletions
diff --git a/msbuild/libunicode.vcxproj b/msbuild/libunicode.vcxproj
index f5387c3..e057fca 100644
--- a/msbuild/libunicode.vcxproj
+++ b/msbuild/libunicode.vcxproj
@@ -76,11 +76,24 @@
<Import Project="compiler.props" />
<ItemGroup>
<ClInclude Include="..\include\unicode.h" />
+ <ClInclude Include="..\include\unicode\conversion.h" />
+ <ClInclude Include="..\include\unicode\endian.h" />
+ <ClInclude Include="..\include\unicode\iso.h" />
+ <ClInclude Include="..\include\unicode\optimization.h" />
+ <ClInclude Include="..\include\unicode\predicate.h" />
+ <ClInclude Include="..\include\unicode\types.h" />
+ <ClInclude Include="..\include\unicode\type_traits.h" />
+ <ClInclude Include="..\include\unicode\utf.h" />
+ <ClInclude Include="..\include\unicode\utf_fwd.h" />
+ <ClInclude Include="..\include\unicode\validation.h" />
<ClInclude Include="..\src\file.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\file.cpp" />
</ItemGroup>
+ <ItemGroup>
+ <Text Include="..\README.txt" />
+ </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
diff --git a/msbuild/libunicode.vcxproj.filters b/msbuild/libunicode.vcxproj.filters
index 7b2e69a..375381f 100644
--- a/msbuild/libunicode.vcxproj.filters
+++ b/msbuild/libunicode.vcxproj.filters
@@ -9,6 +9,12 @@
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
+ <Filter Include="API\unicode">
+ <UniqueIdentifier>{c7957421-abb0-42f5-a876-76c068c9994b}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Documentation">
+ <UniqueIdentifier>{992a4518-a37a-4bae-9afa-00c294516d60}</UniqueIdentifier>
+ </Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\include\unicode.h">
@@ -17,10 +23,45 @@
<ClInclude Include="..\src\file.h">
<Filter>Implementation</Filter>
</ClInclude>
+ <ClInclude Include="..\include\unicode\conversion.h">
+ <Filter>API\unicode</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\unicode\endian.h">
+ <Filter>API\unicode</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\unicode\iso.h">
+ <Filter>API\unicode</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\unicode\optimization.h">
+ <Filter>API\unicode</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\unicode\predicate.h">
+ <Filter>API\unicode</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\unicode\type_traits.h">
+ <Filter>API\unicode</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\unicode\types.h">
+ <Filter>API\unicode</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\unicode\utf.h">
+ <Filter>API\unicode</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\unicode\utf_fwd.h">
+ <Filter>API\unicode</Filter>
+ </ClInclude>
+ <ClInclude Include="..\include\unicode\validation.h">
+ <Filter>API\unicode</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\file.cpp">
<Filter>Implementation</Filter>
</ClCompile>
</ItemGroup>
+ <ItemGroup>
+ <Text Include="..\README.txt">
+ <Filter>Documentation</Filter>
+ </Text>
+ </ItemGroup>
</Project> \ No newline at end of file
diff --git a/msbuild/test-performance.vcxproj b/msbuild/test-performance.vcxproj
index feff0c3..d3c8f6c 100644
--- a/msbuild/test-performance.vcxproj
+++ b/msbuild/test-performance.vcxproj
@@ -85,7 +85,10 @@
<Project>{c53e2afc-ea45-4798-be36-e959bb5c5a53}</Project>
</ProjectReference>
</ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\src\test-helper.h" />
+ </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project> \ No newline at end of file
diff --git a/msbuild/test-performance.vcxproj.filters b/msbuild/test-performance.vcxproj.filters
index b8488bd..1835851 100644
--- a/msbuild/test-performance.vcxproj.filters
+++ b/msbuild/test-performance.vcxproj.filters
@@ -14,4 +14,9 @@
<Filter>Implementation</Filter>
</ClCompile>
</ItemGroup>
-</Project>
+ <ItemGroup>
+ <ClInclude Include="..\src\test-helper.h">
+ <Filter>Implementation</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/msbuild/test-unicode.vcxproj b/msbuild/test-unicode.vcxproj
index 3cd66aa..1438584 100644
--- a/msbuild/test-unicode.vcxproj
+++ b/msbuild/test-unicode.vcxproj
@@ -85,7 +85,10 @@
<Project>{c53e2afc-ea45-4798-be36-e959bb5c5a53}</Project>
</ProjectReference>
</ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\src\test-helper.h" />
+ </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project> \ No newline at end of file
diff --git a/msbuild/test-unicode.vcxproj.filters b/msbuild/test-unicode.vcxproj.filters
index 7d53cda..b728e20 100644
--- a/msbuild/test-unicode.vcxproj.filters
+++ b/msbuild/test-unicode.vcxproj.filters
@@ -14,4 +14,9 @@
<Filter>Implementation</Filter>
</ClCompile>
</ItemGroup>
-</Project>
+ <ItemGroup>
+ <ClInclude Include="..\src\test-helper.h">
+ <Filter>Implementation</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/test-helper.cpp b/src/test-helper.cpp
index d441895..d591916 100644
--- a/src/test-helper.cpp
+++ b/src/test-helper.cpp
@@ -5,6 +5,8 @@
#include <codecvt>
#include <deque>
#include <exception>
+#include <iostream>
+#include <iomanip>
#include <limits>
#include <list>
#include <locale>
@@ -50,6 +52,29 @@ namespace std {
return os;
}
+#ifdef __cpp_char8_t
+ std::ostream& operator<<(std::ostream& os, utf8_t const& c)
+ {
+ os << "\\x" << std::setfill('0') << std::setw(2) << std::right << std::hex << static_cast<uint8_t>(c);
+
+ return os;
+ }
+#endif
+
+ std::ostream& operator<<(std::ostream& os, char16_t const& c)
+ {
+ os << "\\u" << std::setfill('0') << std::setw(4) << std::right << std::hex << static_cast<uint16_t>(c);
+
+ return os;
+ }
+
+ std::ostream& operator<<(std::ostream& os, char32_t const& c)
+ {
+ os << "\\U" << std::setfill('0') << std::setw(8) << std::right << std::hex << static_cast<uint32_t>(c);
+
+ return os;
+ }
+
} // namespace std
namespace {
diff --git a/src/test-helper.h b/src/test-helper.h
index c3e2900..676af73 100644
--- a/src/test-helper.h
+++ b/src/test-helper.h
@@ -14,6 +14,12 @@ namespace std {
std::ostream& operator<<(std::ostream& os, std::basic_string<char16_t> const& s);
std::ostream& operator<<(std::ostream& os, std::basic_string<char32_t> const& s);
+#ifdef __cpp_char8_t
+ std::ostream& operator<<(std::ostream& os, utf8_t const& c);
+#endif
+ std::ostream& operator<<(std::ostream& os, char16_t const& c);
+ std::ostream& operator<<(std::ostream& os, char32_t const& c);
+
} // namespace std
template<typename From, typename To>