diff --git a/ete-test/resources/multi-no-output/spec.cpp b/ete-test/resources/multi-no-output/spec.cpp index 4a363738..4ba5cf99 100644 --- a/ete-test/resources/multi-no-output/spec.cpp +++ b/ete-test/resources/multi-no-output/spec.cpp @@ -13,7 +13,6 @@ class ProblemSpec : public BaseProblemSpec { } void StyleConfig() { - CustomScorer(); NoOutput(); } diff --git a/ete-test/resources/normal-no-output/spec.cpp b/ete-test/resources/normal-no-output/spec.cpp index 09f76aa5..aed13700 100644 --- a/ete-test/resources/normal-no-output/spec.cpp +++ b/ete-test/resources/normal-no-output/spec.cpp @@ -12,7 +12,6 @@ class ProblemSpec : public BaseProblemSpec { } void StyleConfig() { - CustomScorer(); NoOutput(); } diff --git a/include/tcframe/spec/core/StyleConfig.hpp b/include/tcframe/spec/core/StyleConfig.hpp index eebfe576..c0dc20cf 100644 --- a/include/tcframe/spec/core/StyleConfig.hpp +++ b/include/tcframe/spec/core/StyleConfig.hpp @@ -1,13 +1,11 @@ #pragma once -#include #include #include #include "CommonConfig.hpp" using std::move; -using std::runtime_error; using std::tie; namespace tcframe { @@ -56,10 +54,6 @@ class StyleConfigBuilder { } StyleConfig build() { - if (!subject_.needsOutput_ && !subject_.needsCustomScorer_) { - throw runtime_error("Problem that does not need output must need custom scorer"); - } - return move(subject_); } }; diff --git a/test/tcframe/spec/core/BaseProblemSpecTests.cpp b/test/tcframe/spec/core/BaseProblemSpecTests.cpp index ca26bfbe..1091f870 100644 --- a/test/tcframe/spec/core/BaseProblemSpecTests.cpp +++ b/test/tcframe/spec/core/BaseProblemSpecTests.cpp @@ -57,13 +57,6 @@ class BaseProblemSpecTests : public Test { } }; - class ProblemSpecWithIllegalStyleConfig : public ProblemSpec { - protected: - void StyleConfig() { - NoOutput(); - } - }; - class ProblemSpecWithMultipleTestCasesConfig : public ProblemSpec { protected: void MultipleTestCasesConfig() { @@ -118,15 +111,6 @@ TEST_F(BaseProblemSpecTests, StyleConfig) { EXPECT_FALSE(config.needsOutput()); } -TEST_F(BaseProblemSpecTests, StyleConfig_Illegal) { - try { - ProblemSpecWithIllegalStyleConfig().buildStyleConfig(); - FAIL(); - } catch (runtime_error& e) { - EXPECT_THAT(e.what(), StrEq("Problem that does not need output must need custom scorer")); - } -} - TEST_F(BaseProblemSpecTests, MultipleTestCasesConfig) { MultipleTestCasesConfig config = ProblemSpecWithMultipleTestCasesConfig().buildMultipleTestCasesConfig(); EXPECT_TRUE(config.counter());