Skip to content

Commit 8e92867

Browse files
committed
fix
1 parent b3ddbf1 commit 8e92867

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"contestTitle":"TestContest1","contestants":[{"checkJudged":[false,false],"compileMesaage":["",""],"compileState":[1,1],"contestantName":"user1","inputFiles":[[],[]],"judgingTime_date":0,"judgingTime_time":0,"judgingTime_timespec":0,"memoryUsed":[[],[]],"message":[[],[]],"result":[[],[]],"score":[[],[]],"sourceFile":["",""],"timeUsed":[[],[]]},{"checkJudged":[false,false],"compileMesaage":["",""],"compileState":[1,1],"contestantName":"user2","inputFiles":[[],[]],"judgingTime_date":0,"judgingTime_time":0,"judgingTime_timespec":0,"memoryUsed":[[],[]],"message":[[],[]],"result":[[],[]],"score":[[],[]],"sourceFile":["",""],"timeUsed":[[],[]]}],"tasks":[{"answerFileExtension":"out","comparisonMode":1,"compilerConfiguration":{"g++":"default","python":"default"},"diffArguments":"--ignore-space-change --text --brief","inputFileName":"aplusb.in","outputFileName":"aplusb.out","problemTitle":"aplusb","realPrecision":3,"sourceFileName":"aplusb","specialJudge":"","standardInputCheck":true,"standardOutputCheck":true,"subFolderCheck":false,"taskType":0,"testCases":[{"fullScore":100,"inputFiles":["aplusb/1.in"],"memoryLimit":512,"outputFiles":["aplusb/1.out"],"timeLimit":1000}]},{"answerFileExtension":"out","comparisonMode":1,"compilerConfiguration":{"g++":"default","python":"default"},"diffArguments":"--ignore-space-change --text --brief","inputFileName":"helloworld.in","outputFileName":"helloworld.out","problemTitle":"helloworld","realPrecision":3,"sourceFileName":"helloworld","specialJudge":"","standardInputCheck":true,"standardOutputCheck":true,"subFolderCheck":false,"taskType":0,"testCases":[{"fullScore":17,"inputFiles":["helloworld/1.in"],"memoryLimit":512,"outputFiles":["helloworld/1.out"],"timeLimit":1000},{"fullScore":17,"inputFiles":["helloworld/2.in"],"memoryLimit":512,"outputFiles":["helloworld/2.out"],"timeLimit":1000},{"fullScore":17,"inputFiles":["helloworld/3.in"],"memoryLimit":512,"outputFiles":["helloworld/3.out"],"timeLimit":1000},{"fullScore":17,"inputFiles":["helloworld/4.in"],"memoryLimit":512,"outputFiles":["helloworld/4.out"],"timeLimit":1000},{"fullScore":16,"inputFiles":["helloworld/5.in"],"memoryLimit":512,"outputFiles":["helloworld/5.out"],"timeLimit":1000},{"fullScore":16,"inputFiles":["helloworld/6.in"],"memoryLimit":512,"outputFiles":["helloworld/6.out"],"timeLimit":1000}]}],"version":"1.0"}
1+
{"contestTitle":"TestContest1","contestants":[{"checkJudged":[false,false],"compileMesaage":["",""],"compileState":[1,1],"contestantName":"user1","inputFiles":[[],[]],"judgingTime_date":0,"judgingTime_time":0,"judgingTime_timespec":0,"memoryUsed":[[],[]],"message":[[],[]],"result":[[],[]],"score":[[],[]],"sourceFile":["",""],"timeUsed":[[],[]]},{"checkJudged":[false,false],"compileMesaage":["",""],"compileState":[1,1],"contestantName":"user2","inputFiles":[[],[]],"judgingTime_date":0,"judgingTime_time":0,"judgingTime_timespec":0,"memoryUsed":[[],[]],"message":[[],[]],"result":[[],[]],"score":[[],[]],"sourceFile":["",""],"timeUsed":[[],[]]}],"tasks":[{"answerFileExtension":"out","comparisonMode":1,"compilerConfiguration":{"g++":"default","python":"default"},"diffArguments":"--ignore-space-change --text --brief","inputFileName":"aplusb.in","outputFileName":"aplusb.out","problemTitle":"aplusb","realPrecision":3,"sourceFileName":"aplusb","specialJudge":"","standardInputCheck":true,"standardOutputCheck":true,"subFolderCheck":false,"taskType":0,"testCases":[{"fullScore":100,"inputFiles":["aplusb/1.in"],"memoryLimit":512,"outputFiles":["aplusb/1.ans"],"timeLimit":1000}]},{"answerFileExtension":"out","comparisonMode":1,"compilerConfiguration":{"g++":"default","python":"default"},"diffArguments":"--ignore-space-change --text --brief","inputFileName":"helloworld.in","outputFileName":"helloworld.out","problemTitle":"helloworld","realPrecision":3,"sourceFileName":"helloworld","specialJudge":"","standardInputCheck":true,"standardOutputCheck":true,"subFolderCheck":false,"taskType":0,"testCases":[{"fullScore":17,"inputFiles":["helloworld/1.in"],"memoryLimit":512,"outputFiles":["helloworld/1.ans"],"timeLimit":1000},{"fullScore":17,"inputFiles":["helloworld/2.in"],"memoryLimit":512,"outputFiles":["helloworld/2.ans"],"timeLimit":1000},{"fullScore":17,"inputFiles":["helloworld/3.in"],"memoryLimit":512,"outputFiles":["helloworld/3.ans"],"timeLimit":1000},{"fullScore":17,"inputFiles":["helloworld/4.in"],"memoryLimit":512,"outputFiles":["helloworld/4.ans"],"timeLimit":1000},{"fullScore":16,"inputFiles":["helloworld/5.in"],"memoryLimit":512,"outputFiles":["helloworld/5.ans"],"timeLimit":1000},{"fullScore":16,"inputFiles":["helloworld/6.in"],"memoryLimit":512,"outputFiles":["helloworld/6.ans"],"timeLimit":1000}]}],"version":"1.0"}

tests/test1/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ set(TEST1_SOURCES
1212
main.cpp
1313
)
1414

15-
add_executable(test1 ${TEST1_SOURCES})
15+
if (NOT WIN32)
16+
list(APPEND TEST1_SOURCES ${CMAKE_BINARY_DIR}/watcher.qrc)
17+
add_executable(test1 ${TEST1_SOURCES})
18+
add_dependencies(test1 watcher_unix)
19+
else()
20+
add_executable(test1 ${TEST1_SOURCES})
21+
endif()
22+
1623

1724
target_precompile_headers(test1 REUSE_FROM lemon-core)
1825

tests/test1/main.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,7 @@ class TestContest : public QObject {
278278
QVERIFY2(helloworldIdx >= 0, "Task 'helloworld' not found");
279279

280280
// RE and MLE are treated as equivalent (platform-dependent)
281-
auto isRuntimeFailure = [](ResultState r) {
282-
return r == RunTimeError || r == MemoryLimitExceeded || r == CannotStartProgram;
283-
};
281+
auto isRuntimeFailure = [](ResultState r) { return r == RunTimeError || r == MemoryLimitExceeded; };
284282

285283
// --- user2: always prints "AC" → all 6 test cases must be AC ---
286284
Contestant *user2 = contest->getContestant("user2");

0 commit comments

Comments
 (0)