From 402be30268bbd6930c9f76547f8dab3e304005c3 Mon Sep 17 00:00:00 2001 From: Sergiusz Bazanski Date: Thu, 26 Jul 2018 22:41:10 +0100 Subject: gui: after review of quadtree by msgctl, tougher tests --- tests/gui/quadtree.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/gui') diff --git a/tests/gui/quadtree.cc b/tests/gui/quadtree.cc index ca90a426..083a0057 100644 --- a/tests/gui/quadtree.cc +++ b/tests/gui/quadtree.cc @@ -58,7 +58,7 @@ TEST_F(QuadTreeTest, insert_count) auto rng = NEXTPNR_NAMESPACE::DeterministicRNG(); // Add 10000 random rectangles. - for (int i = 0; i < 10000; i++) { + for (unsigned int i = 0; i < 10000; i++) { int x0 = rng.rng(width_); int y0 = rng.rng(height_); int w = rng.rng(width_ - x0); @@ -69,7 +69,7 @@ TEST_F(QuadTreeTest, insert_count) ASSERT_EQ(qt_->size(), i+1); } // Add 100000 random points. - for (int i = 0; i < 100000; i++) { + for (unsigned int i = 0; i < 100000; i++) { int x0 = rng.rng(width_); int y0 = rng.rng(height_); int x1 = x0; @@ -113,7 +113,7 @@ TEST_F(QuadTreeTest, insert_retrieve_same) auto res = qt_->get(x, y); // Somewhat arbirary test to make sure we don't return obscene // amounts of data. - ASSERT_LT(res.size(), 200); + ASSERT_LT(res.size(), 200UL); bool found = false; for (auto elem : res) { // Is this what we're looking for? -- cgit v1.2.3