X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=test%2Fratio_test.cc;h=a21859049823cb9cc07db48ed223b4d0c53a8623;hb=4ec9f7096050e9d1107628ffc28b785fba3020a0;hp=43f1d2a15b8cc8d58d8b5bccd26590fd94d7eea9;hpb=9458457504af5548bc51b3c29e65dbe92fd0513d;p=dcpomatic.git diff --git a/test/ratio_test.cc b/test/ratio_test.cc index 43f1d2a15..a21859049 100644 --- a/test/ratio_test.cc +++ b/test/ratio_test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2014 Carl Hetherington + Copyright (C) 2012-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -28,13 +28,12 @@ #include #include "lib/ratio.h" #include "lib/util.h" +#include "test.h" using std::ostream; BOOST_AUTO_TEST_CASE (ratio_test) { - Ratio::setup_ratios (); - Ratio const * r = Ratio::from_id ("119"); BOOST_CHECK (r); BOOST_CHECK_EQUAL (fit_ratio_within (r->ratio(), dcp::Size (2048, 1080)), dcp::Size (1290, 1080)); @@ -67,3 +66,10 @@ BOOST_AUTO_TEST_CASE (ratio_test) BOOST_CHECK (r); BOOST_CHECK_EQUAL (fit_ratio_within (r->ratio(), dcp::Size (2048, 1080)), dcp::Size (2048, 1080)); } + + +BOOST_AUTO_TEST_CASE (ratios_use_same_pointers_test) +{ + auto const test = Ratio::from_id ("119"); + BOOST_CHECK_EQUAL (test, Ratio::from_id("119")); +}