@@ -56,7 +56,7 @@ TEST_F(ExpectedTest, ExpectScalarScalar) {
5656
5757TEST_F (ExpectedTest, UnexpectScalarScalar) {
5858 int sample = get_rand ();
59- auto expected = Expected<int , int >(Unexpected (sample));
59+ auto expected = Expected<int , int >(Unexpected< int > (sample));
6060 EXPECT_FALSE (bool (expected));
6161 EXPECT_FALSE (expected.has_value ());
6262 EXPECT_EQ (sample, expected.error ());
@@ -73,7 +73,7 @@ TEST_F(ExpectedTest, ExpectScalar) {
7373
7474TEST_F (ExpectedTest, UnexpectScalar) {
7575 int sample = get_rand ();
76- auto expected = Expected<std::string, int >(Unexpected (sample));
76+ auto expected = Expected<std::string, int >(Unexpected< int > (sample));
7777 EXPECT_FALSE (bool (expected));
7878 EXPECT_FALSE (expected.has_value ());
7979 EXPECT_EQ (sample, expected.error ());
@@ -82,7 +82,7 @@ TEST_F(ExpectedTest, UnexpectScalar) {
8282TEST_F (ExpectedTest, UnexpectValueOr) {
8383 int sample = get_rand ();
8484 auto expected =
85- Expected<int , std::string>(Unexpected (std::string (" hello" )));
85+ Expected<int , std::string>(Unexpected<std::string> (std::string (" hello" )));
8686 EXPECT_FALSE (bool (expected));
8787 EXPECT_FALSE (expected.has_value ());
8888 EXPECT_EQ (sample, expected.value_or (sample));
@@ -111,7 +111,7 @@ TEST_F(ExpectedTest, UnexpectUnique) {
111111 auto x = get_rand ();
112112 auto y = get_rand ();
113113 auto expected = Expected<int , std::unique_ptr<Pair>>(
114- Unexpected (std::make_unique<Pair>(x, y)));
114+ Unexpected<std::unique_ptr<Pair>> (std::make_unique<Pair>(x, y)));
115115 EXPECT_FALSE (bool (expected));
116116 EXPECT_FALSE (expected.has_value ());
117117 auto p = std::move (expected).error ();
@@ -136,7 +136,7 @@ TEST_F(ExpectedTest, UnexpectShared) {
136136 auto x = get_rand ();
137137 auto y = get_rand ();
138138 auto expected = Expected<int , std::shared_ptr<Pair>>(
139- Unexpected (std::make_shared<Pair>(x, y)));
139+ Unexpected<std::shared_ptr<Pair>> (std::make_shared<Pair>(x, y)));
140140 EXPECT_FALSE (bool (expected));
141141 EXPECT_FALSE (expected.has_value ());
142142 EXPECT_EQ (x, expected.error ()->x );
@@ -158,7 +158,7 @@ TEST_F(ExpectedTest, ExpectStruct) {
158158TEST_F (ExpectedTest, UnexpectStruct) {
159159 auto x = get_rand ();
160160 auto y = get_rand ();
161- auto expected = Expected<int , Pair>(Unexpected (Pair (x, y)));
161+ auto expected = Expected<int , Pair>(Unexpected<Pair> (Pair (x, y)));
162162 EXPECT_FALSE (bool (expected));
163163 EXPECT_FALSE (expected.has_value ());
164164 EXPECT_EQ (x, expected.error ().x );
@@ -202,7 +202,7 @@ TEST_F(ExpectedTest, UnexpectStructDestruct) {
202202 auto x = get_rand ();
203203 auto y = get_rand ();
204204 auto expected =
205- Expected<int , PairDestruct>(Unexpected (PairDestruct (x, y)));
205+ Expected<int , PairDestruct>(Unexpected<PairDestruct> (PairDestruct (x, y)));
206206 EXPECT_EQ (1 , PairDestruct::cd_count);
207207 EXPECT_FALSE (bool (expected));
208208 EXPECT_FALSE (expected.has_value ());
@@ -214,7 +214,7 @@ TEST_F(ExpectedTest, UnexpectStructDestruct) {
214214
215215TEST_F (ExpectedTest, ExceptionValueCheckedWhenIsError) {
216216 auto expected =
217- Expected<int , std::string>(Unexpected (std::string (" hello" )));
217+ Expected<int , std::string>(Unexpected<std::string> (std::string (" hello" )));
218218 EXPECT_THROW (
219219 {
220220 try {
@@ -249,7 +249,7 @@ TEST_F(ExpectedTest, ExceptionErrorCheckedWhenNotError) {
249249
250250TEST_F (ExpectedTest, ExceptionDerefValueWhenUnexpected) {
251251 auto expected =
252- Expected<const Pair, std::string>(Unexpected (std::string (" hello" )));
252+ Expected<const Pair, std::string>(Unexpected<std::string> (std::string (" hello" )));
253253 EXPECT_THROW (
254254 {
255255 try {
@@ -268,7 +268,7 @@ TEST_F(ExpectedTest, ExceptionDerefValueWhenUnexpected) {
268268
269269TEST_F (ExpectedTest, ExceptionDerefPtrWhenUnexpected) {
270270 auto expected =
271- Expected<Pair, std::string>(Unexpected (std::string (" hello" )));
271+ Expected<Pair, std::string>(Unexpected<std::string> (std::string (" hello" )));
272272 EXPECT_THROW (
273273 {
274274 try {
0 commit comments