Added test for Issue #305.

This commit is contained in:
Neil MacIntosh 2016-08-09 18:07:17 -07:00
parent 9ab3a2ac39
commit f9f08a56fa

View File

@ -18,6 +18,7 @@
#include <cstdlib> #include <cstdlib>
#include <string_span.h> #include <string_span.h>
#include <vector> #include <vector>
#include <map>
using namespace std; using namespace std;
using namespace gsl; using namespace gsl;
@ -942,7 +943,13 @@ SUITE(string_span_tests)
CHECK(*(str + 3) == L'\0'); CHECK(*(str + 3) == L'\0');
} }
} }
}
TEST(Issue305)
{
std::map<gsl::cstring_span<>, int> foo = { { "foo", 0 },{ "bar", 1 } };
CHECK(foo["foo"] == 0);
CHECK(foo["bar"] == 1);
} }
} }