use of com.squarespace.template.CodeMachine in project template-compiler by Squarespace.
the class UnitsMetricPredicateTest method run.
private void run(CLDR.Locale locale, String template, String expected) throws CodeException {
Context ctx = new Context(new TextNode(""));
ctx.cldrLocale(locale);
CodeMachine sink = machine();
tokenizer(template, sink).consume();
ctx.execute(sink.getCode());
Assert.assertEquals(ctx.buffer().toString(), expected);
}
Aggregations