Allow AsInt from Float EffectParameter, and AsFloat from Int EffectParameter.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -13,6 +13,7 @@ TEST_CASE("Bool EffectParameter", "[Library]") {
|
||||
TEST_CASE("Int EffectParameter", "[Library]") {
|
||||
auto p = EffectParameter((int64_t)684);
|
||||
REQUIRE(p.AsInt() == 684);
|
||||
REQUIRE(p.AsFloat() == 684);
|
||||
}
|
||||
|
||||
TEST_CASE("String EffectParameter", "[Library]") {
|
||||
@@ -23,6 +24,7 @@ TEST_CASE("String EffectParameter", "[Library]") {
|
||||
TEST_CASE("Float EffectParameter", "[Library]") {
|
||||
auto p = EffectParameter(1.5f);
|
||||
REQUIRE(p.AsFloat() == Approx(1.5f));
|
||||
REQUIRE(p.AsInt() == 1);
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user