diff --git a/benchmark/test_face_ptr_creation.cpp b/benchmark/test_face_ptr_creation.cpp index 6f2410f0b..b546c32c8 100644 --- a/benchmark/test_face_ptr_creation.cpp +++ b/benchmark/test_face_ptr_creation.cpp @@ -9,19 +9,31 @@ public: : test_case(params) {} bool validate() const { - return true; + std::size_t count = 0; + std::size_t expected_count = mapnik::freetype_engine::face_names().size(); + mapnik::freetype_engine engine; + for (std::string const& name : mapnik::freetype_engine::face_names()) + { + mapnik::face_ptr f = engine.create_face(name); + if (f) ++count; + } + return count == expected_count; } void operator()() const { mapnik::freetype_engine engine; - unsigned long count = 0; + std::size_t expected_count = mapnik::freetype_engine::face_names().size(); for (unsigned i=0;i