7501793675
GoogleTest provides a number of nice features (such as autodiscovery) that make writing and running tests easier and less tedious. This patch converts the litehtml tests over to use GoogleTest. Note that the conversion is mostly mechanical -- no attempt has been made to make the tests "idiomatic" GoogleTests. Most of the CMake changes are based on code from the GoogleTest documentation, specifically the "Quickstart: Building with CMake" guide: https://google.github.io/googletest/quickstart-cmake.html
14 lines
316 B
C++
14 lines
316 B
C++
#include <gtest/gtest.h>
|
|
|
|
#include "litehtml.h"
|
|
#include "test/container_test.h"
|
|
|
|
using namespace litehtml;
|
|
|
|
TEST(LayoutGlobal, Smoke) {
|
|
context ctx;
|
|
container_test container;
|
|
litehtml::document::ptr doc = document::createFromString(_t("<html>Body</html>"), &container, &ctx);
|
|
doc->render(50, render_all);
|
|
}
|