2016-12-23 02:28:21 +08:00
|
|
|
#include "gtest/gtest.h"
|
2016-07-05 11:01:22 +08:00
|
|
|
|
|
|
|
#include "template_engine/engine.hpp"
|
|
|
|
|
2016-12-23 02:28:21 +08:00
|
|
|
TEST(TemplateEngine, BasicPlaceholderReplacement)
|
2016-07-05 11:01:22 +08:00
|
|
|
{
|
2016-11-02 23:05:02 +08:00
|
|
|
auto rendered = template_engine::render("{{one}} {{two}}",
|
|
|
|
{{"one", "two"}, {"two", "one"}});
|
2016-07-05 11:01:22 +08:00
|
|
|
|
2016-12-23 02:28:21 +08:00
|
|
|
ASSERT_EQ(rendered, "two one");
|
|
|
|
}
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
::testing::InitGoogleTest(&argc, argv);
|
|
|
|
return RUN_ALL_TESTS();
|
2016-07-05 11:01:22 +08:00
|
|
|
}
|