Fixes initializer_list casting bug in PrettyPrint tests.
This commit is contained in:
@@ -182,12 +182,13 @@ TestResults test_PrettyPrintWithATuple() {
|
|||||||
TestResults test_PrettyPrintWithAnInitializerList() {
|
TestResults test_PrettyPrintWithAnInitializerList() {
|
||||||
auto pretty_print = [](int i) {
|
auto pretty_print = [](int i) {
|
||||||
ostringstream os;
|
ostringstream os;
|
||||||
|
std::initializer_list<string> empty_initializer_list = {};
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 1:
|
case 1:
|
||||||
PrettyPrint(os, {"one", "two", "three"});
|
PrettyPrint(os, {"one", "two", "three"});
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
PrettyPrint(os, (std::initializer_list<string>){});
|
PrettyPrint(os, empty_initializer_list);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
PrettyPrint(os, {1, 2, 3});
|
PrettyPrint(os, {1, 2, 3});
|
||||||
|
|||||||
Reference in New Issue
Block a user