Rename createSingeColorImage -> createSingleColorImage

This commit is contained in:
Alexander Bock
2021-03-22 23:17:42 +01:00
parent c7f77e3286
commit dfc42e9467
5 changed files with 15 additions and 15 deletions

View File

@@ -38,7 +38,7 @@ TEST_CASE("CreateSingleColorImage: Create image and check return value",
ghoul::lua::push(L, "colorFile");
ghoul::lua::push(L, std::vector{ 1.0, 0.0, 0.0 });
int res = openspace::luascriptfunctions::createSingeColorImage(L);
int res = openspace::luascriptfunctions::createSingleColorImage(L);
// One return value
CHECK(res == 1);
@@ -58,7 +58,7 @@ TEST_CASE("CreateSingleColorImage: Faulty 1st input type", "[createsinglecolorim
ghoul::lua::push(L, std::vector{ 1.0, 0.0, 0.0 });
CHECK_THROWS_WITH(
openspace::luascriptfunctions::createSingeColorImage(L),
openspace::luascriptfunctions::createSingleColorImage(L),
Catch::Matchers::Contains("parameter 1 was not the expected type")
);
}
@@ -69,7 +69,7 @@ TEST_CASE("CreateSingleColorImage: Faulty 2nd input type", "[createsinglecolorim
ghoul::lua::push(L, "not a vector");
CHECK_THROWS_WITH(
openspace::luascriptfunctions::createSingeColorImage(L),
openspace::luascriptfunctions::createSingleColorImage(L),
Catch::Matchers::Contains("parameter 2 was not the expected type")
);
}
@@ -80,7 +80,7 @@ TEST_CASE("CreateSingleColorImage: Invalid number of inputs", "[createsinglecolo
ghoul::lua::push(L, std::vector{ 1.0, 0.0, 0.0 });
CHECK_THROWS_WITH(
openspace::luascriptfunctions::createSingeColorImage(L),
openspace::luascriptfunctions::createSingleColorImage(L),
Catch::Matchers::Contains("Expected 2 arguments, got 1")
);
}
@@ -93,7 +93,7 @@ TEST_CASE("CreateSingleColorImage: Faulty color value (vec4)",
ghoul::lua::push(L, std::vector{ 1.0, 0.0, 0.0, 0.0 });
CHECK_THROWS_WITH(
openspace::luascriptfunctions::createSingeColorImage(L),
openspace::luascriptfunctions::createSingleColorImage(L),
Catch::Matchers::Contains(
"Invalid color. Expected three double values {r, g, b} in range 0 to 1"
)
@@ -108,7 +108,7 @@ TEST_CASE("CreateSingleColorImage: Faulty color value (invalid values)",
ghoul::lua::push(L, std::vector{ 255.0, 0.0, 0.0 }); // not a valid color
CHECK_THROWS_WITH(
openspace::luascriptfunctions::createSingeColorImage(L),
openspace::luascriptfunctions::createSingleColorImage(L),
Catch::Matchers::Contains(
"Invalid color. Expected three double values {r, g, b} in range 0 to 1"
)
@@ -122,7 +122,7 @@ TEST_CASE("CreateSingleColorImage: Check if file was created",
ghoul::lua::push(L, "colorFile2");
ghoul::lua::push(L, std::vector{ 0.0, 1.0, 0.0 });
int res = openspace::luascriptfunctions::createSingeColorImage(L);
int res = openspace::luascriptfunctions::createSingleColorImage(L);
CHECK(res == 1);
std::string path = ghoul::lua::value<std::string>(L, 1);
@@ -135,7 +135,7 @@ TEST_CASE("CreateSingleColorImage: Load created image", "[createsinglecolorimage
ghoul::lua::push(L, std::vector{ 1.0, 0.0, 0.0 });
// Loads the same file that was created in a previous test case
int res = openspace::luascriptfunctions::createSingeColorImage(L);
int res = openspace::luascriptfunctions::createSingleColorImage(L);
CHECK(res == 1);
CHECK(lua_gettop(L) == 1);