From cae2e7e910cf3b8e44a0844bb880bcba1fea085c Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Fri, 4 Dec 2020 10:11:58 -0500 Subject: [PATCH] Point: Unit tests for new constructor --- tests/Point_Tests.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/Point_Tests.cpp b/tests/Point_Tests.cpp index cce78337..852145d5 100644 --- a/tests/Point_Tests.cpp +++ b/tests/Point_Tests.cpp @@ -59,6 +59,16 @@ TEST(XY_Constructor) CHECK_EQUAL(openshot::InterpolationType::BEZIER, p1.interpolation); } +TEST(Pair_Constructor) +{ + // Create a point from a std::pair + std::pair coordinates(22, 5); + openshot::Point p1(coordinates); + + CHECK_EQUAL(22, p1.co.X); + CHECK_EQUAL(5, p1.co.Y); +} + TEST(Constructor_With_Coordinate) { // Create a point with a coordinate