Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/GSL.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/string_span_tests.cpp')
-rw-r--r--tests/string_span_tests.cpp7
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);
}
}