Added workaround for MSVC 2013 compiler bug.

This commit is contained in:
Neil MacIntosh
2015-11-05 09:29:30 -08:00
parent caabb40440
commit 4e4882bda8
2 changed files with 64 additions and 5 deletions

View File

@@ -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 *[])