expected tests
parent
298c640d03
commit
d8e75d58d9
10
src/main.cpp
10
src/main.cpp
|
@ -425,6 +425,14 @@ enum class error
|
|||
struct simple
|
||||
{
|
||||
float f;
|
||||
|
||||
simple(const simple& nontrival)
|
||||
{
|
||||
if (nontrival.f < 50)
|
||||
f = 5000;
|
||||
else
|
||||
f = nontrival.f;
|
||||
}
|
||||
};
|
||||
|
||||
blt::expected<float, error> t1(bool b)
|
||||
|
@ -433,7 +441,7 @@ blt::expected<float, error> t1(bool b)
|
|||
if (b)
|
||||
return f;
|
||||
else
|
||||
return error::S1;
|
||||
return blt::unexpected(error::S1);
|
||||
}
|
||||
|
||||
void init()
|
||||
|
|
Loading…
Reference in New Issue