@@ -34,6 +34,7 @@ static Settings *createSettings(QObject *parent = nullptr) {
3434 s->setDefaultFullScore (100 );
3535 s->setDefaultTimeLimit (1000 );
3636 s->setDefaultMemoryLimit (512 );
37+ s->setDefaultExtraTimeRatio (0.1 );
3738 s->setCompileTimeLimit (10000 );
3839 s->setSpecialJudgeTimeLimit (10000 );
3940 s->setFileSizeLimit (50 );
@@ -58,7 +59,7 @@ static Settings *createSettings(QObject *parent = nullptr) {
5859 gpp->setCompilerLocation (gppPath);
5960 gpp->setTimeLimitRatio (1.0 );
6061 gpp->setMemoryLimitRatio (1.0 );
61- gpp->setDisableMemoryLimitCheck (true ); // memory check needs watcher on Unix
62+ gpp->setDisableMemoryLimitCheck (false ); // memory check needs watcher on Unix
6263 gpp->setInterpreterAsWatcher (false );
6364 gpp->addConfiguration (" default" , " %s.* -o %s -O2 -lm" , " " );
6465 s->addCompiler (gpp);
@@ -76,9 +77,9 @@ static Settings *createSettings(QObject *parent = nullptr) {
7677 py->setCompilerName (" python" );
7778 py->setSourceExtensions (" py" );
7879 py->setInterpreterLocation (pythonPath);
79- py->setTimeLimitRatio (5 .0 ); // give python more time
80+ py->setTimeLimitRatio (2 .0 ); // give python more time
8081 py->setMemoryLimitRatio (1.0 );
81- py->setDisableMemoryLimitCheck (true );
82+ py->setDisableMemoryLimitCheck (false );
8283 py->setInterpreterAsWatcher (false );
8384 py->addConfiguration (" default" , " " , " %s.py" );
8485 s->addCompiler (py);
@@ -132,7 +133,7 @@ class TestContest : public QObject {
132133 // Without this, the inline shared_ptr `Lemon::base::logger` is null
133134 // and any Settings setter that calls DEBUG() will crash.
134135 auto console_sink = std::make_shared<spdlog::sinks::stdout_color_sink_mt>();
135- console_sink->set_level (spdlog::level::warn );
136+ console_sink->set_level (spdlog::level::info );
136137 Lemon::base::logger = std::make_shared<spdlog::logger>(spdlog::logger (" test" , {console_sink}));
137138
138139 m_contestDir = QString (TEST_DATA_DIR) + " /TestContest1" ;
@@ -288,10 +289,10 @@ class TestContest : public QObject {
288289 const auto &res = user2->getResult (helloworldIdx);
289290 QCOMPARE (res.size (), 6 );
290291 for (int tc = 0 ; tc < 6 ; tc++) {
291- QVERIFY2 (res[tc][ 0 ] == CorrectAnswer,
292- qPrintable ( QString ( " user2 helloworld case %1: expected AC, got %2 " )
293- . arg (tc)
294- .arg (res[tc][0 ])));
292+ QVERIFY2 (
293+ res[tc][ 0 ] == CorrectAnswer,
294+ qPrintable (
295+ QString ( " user2 helloworld case %1: expected AC, got %2 " ). arg (tc) .arg (res[tc][0 ])));
295296 }
296297 }
297298
0 commit comments