mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
test scene: revert section usage.
Dismiss this usage for consistency. Yet we have no practical necessity, we can apply this to *all test suites later.
This commit is contained in:
parent
55a5b9492b
commit
97302d2983
1 changed files with 17 additions and 21 deletions
|
@ -35,38 +35,34 @@ TEST_CASE("Pushing Paints Into Scene", "[tvgScene]")
|
|||
{
|
||||
auto scene = Scene::gen();
|
||||
REQUIRE(scene);
|
||||
SECTION("Pushing Paints") {
|
||||
|
||||
//Pushing Paints
|
||||
REQUIRE(scene->push(move(Shape::gen())) == Result::Success);
|
||||
REQUIRE(scene->push(move(Picture::gen())) == Result::Success);
|
||||
REQUIRE(scene->push(move(Scene::gen())) == Result::Success);
|
||||
}
|
||||
|
||||
SECTION("Pushing Null Pointer") {
|
||||
//Pushing Null Pointer
|
||||
REQUIRE(scene->push(nullptr) == Result::MemoryCorruption);
|
||||
}
|
||||
|
||||
SECTION("Pushing Invalid Object") {
|
||||
//Pushing Invalid Object
|
||||
std::unique_ptr<Shape> shape = nullptr;
|
||||
REQUIRE(scene->push(move(shape)) == Result::MemoryCorruption);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("Scene Memory Reservation", "[tvgScene]")
|
||||
{
|
||||
auto scene = Scene::gen();
|
||||
REQUIRE(scene);
|
||||
|
||||
SECTION("Check Growth / Reduction") {
|
||||
//Check Growth / Reduction
|
||||
REQUIRE(scene->reserve(10) == Result::Success);
|
||||
REQUIRE(scene->reserve(1000) == Result::Success);
|
||||
REQUIRE(scene->reserve(100) == Result::Success);
|
||||
REQUIRE(scene->reserve(0) == Result::Success);
|
||||
}
|
||||
|
||||
SECTION("Too Big Size") {
|
||||
//Too Big Size
|
||||
REQUIRE(scene->reserve(-1) == Result::FailedAllocation);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("Scene Clear", "[tvgScene]")
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue