Added some tests to ensure Issue #305 doesn't recur.

This commit is contained in:
Neil MacIntosh 2016-08-09 18:37:25 -07:00 committed by GitHub
commit f5dda0fb20

View File

@ -18,6 +18,7 @@
#include <cstdlib>
#include <gsl/string_span.h>
#include <vector>
#include <map>
using namespace std;
using namespace gsl;
@ -942,7 +943,13 @@ SUITE(string_span_tests)
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);
}
}