diff options
author | Neil MacIntosh <neilmac@microsoft.com> | 2016-08-09 18:07:17 -0700 |
---|---|---|
committer | Neil MacIntosh <neilmac@microsoft.com> | 2016-08-09 18:07:17 -0700 |
commit | f9f08a56fa08addbd96ab90430735e4e044a3af1 (patch) | |
tree | f17a6e8d707f9fd979e1133c1d4d51635b7edf13 | |
parent | 9ab3a2ac3960145c309e3935851ee5e4337c93ee (diff) | |
download | platform_external_Microsoft-GSL-f9f08a56fa08addbd96ab90430735e4e044a3af1.tar.gz platform_external_Microsoft-GSL-f9f08a56fa08addbd96ab90430735e4e044a3af1.tar.bz2 platform_external_Microsoft-GSL-f9f08a56fa08addbd96ab90430735e4e044a3af1.zip |
Added test for Issue #305.
-rw-r--r-- | tests/string_span_tests.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/string_span_tests.cpp b/tests/string_span_tests.cpp index 876886a..ca60e4b 100644 --- a/tests/string_span_tests.cpp +++ b/tests/string_span_tests.cpp @@ -18,6 +18,7 @@ #include <cstdlib> #include <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); } } |