From 1e8f7f9fa5f2a896462f5487d2d202619f26ac06 Mon Sep 17 00:00:00 2001 From: Alek Mosingiewicz Date: Thu, 10 May 2018 18:40:56 +0200 Subject: [PATCH] Simplify BOM test. --- unittests/compiled_tests.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/unittests/compiled_tests.cpp b/unittests/compiled_tests.cpp index dc4a1f24..18cf9202 100644 --- a/unittests/compiled_tests.cpp +++ b/unittests/compiled_tests.cpp @@ -360,9 +360,7 @@ TEST_CASE("BOM at beginning of string") chai.eval("def func() { return \"Hello World\"; };"); - std::string result = chai.eval("\xef\xbb\xbf(func())"); - - CHECK(result.compare(std::string("Hello World")) == 0); + CHECK(chai.eval("\xef\xbb\xbf(func())") == "Hello World"); }