From 8584fb2b05042a5149cc1822a5ca151b1cf387c7 Mon Sep 17 00:00:00 2001 From: nick black Date: Sun, 6 Dec 2020 22:55:13 -0500 Subject: [PATCH] Metric unit test: call notcurses_stop() at end only --- tests/metric.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/metric.cpp b/tests/metric.cpp index bf4181e73..4e9311300 100644 --- a/tests/metric.cpp +++ b/tests/metric.cpp @@ -425,11 +425,6 @@ TEST_CASE("Metric") { if(!nc_){ return; } - if(!notcurses_canutf8(nc_)){ - CHECK(0 == notcurses_stop(nc_)); - return; - } - CHECK(0 == notcurses_stop(nc_)); const wchar_t* smallsuffixes; if(notcurses_canutf8(nc_)){ smallsuffixes = L"yzafpnµm"; @@ -456,6 +451,7 @@ TEST_CASE("Metric") { }while(++i < (wcslen(smallsuffixes) - 3) * 3); // If we ran through all our suffixes, that's a problem CHECK(wcslen(smallsuffixes) * 3 > i); + CHECK(0 == notcurses_stop(nc_)); } // inspired by #929