diff options
author | Neil MacIntosh <neilmac@microsoft.com> | 2016-08-09 18:37:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-09 18:37:25 -0700 |
commit | f5dda0fb20ef6025a8f9155921b5e3e27c125f79 (patch) | |
tree | ffdbfb286b986aba7522df26cd6a0cde069750fc | |
parent | 92fdde29192a1eef3e3e13035109f0456aea3ac2 (diff) | |
parent | 5ebfc16f14044a2edec68813b22b826e7bfbf9ee (diff) | |
download | platform_external_Microsoft-GSL-f5dda0fb20ef6025a8f9155921b5e3e27c125f79.tar.gz platform_external_Microsoft-GSL-f5dda0fb20ef6025a8f9155921b5e3e27c125f79.tar.bz2 platform_external_Microsoft-GSL-f5dda0fb20ef6025a8f9155921b5e3e27c125f79.zip |
Added some tests to ensure Issue #305 doesn't recur.
-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 fbaa9e8..3eeacb0 100644 --- a/tests/string_span_tests.cpp +++ b/tests/string_span_tests.cpp @@ -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); } } |