forked from microsoft/GSL
Added workaround for MSVC 2013 compiler bug.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
using namespace std;
|
||||
using namespace gsl;
|
||||
|
||||
|
||||
SUITE(string_span_tests)
|
||||
{
|
||||
|
||||
@@ -104,6 +105,18 @@ SUITE(string_span_tests)
|
||||
string_span<> v3 = "Hello";
|
||||
#endif
|
||||
}
|
||||
|
||||
TEST(TestToString)
|
||||
{
|
||||
auto s = gsl::to_string(cstring_span<>{});
|
||||
CHECK(s.length() == 0);
|
||||
|
||||
char stack_string[] = "Hello";
|
||||
cstring_span<> v = ensure_z(stack_string);
|
||||
auto s2 = gsl::to_string(v);
|
||||
CHECK(s2.length() == v.length());
|
||||
CHECK(s2.length() == 5);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int, const char *[])
|
||||
|
||||
Reference in New Issue
Block a user