mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Added some tests to ensure Issue #305 doesn't recur.
This commit is contained in:
commit
f5dda0fb20
@ -18,6 +18,7 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <gsl/string_span.h>
|
#include <gsl/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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user