changing how to handle message and tests
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{"type":"start", "id": 1, "mode": "normal", "user_id": 1}
|
||||
{"type":"start", "id": 1, "mode": "normal", "bearer": ""}
|
||||
{"type": "note_on", "id": 2, "time": 3750, "note": 67}
|
||||
{"type": "note_off", "id": 2, "time": 3980, "note": 67}
|
||||
{"type": "note_on", "id": 3, "time": 4000, "note": 62}
|
||||
@@ -17,5 +17,5 @@
|
||||
{"type": "note_off", "id": 9, "time": 6990, "note": 62}
|
||||
{"type": "note_on", "id": 10, "time": 6750, "note": 60}
|
||||
{"type": "note_off", "id": 10, "time": 7240, "note": 60}
|
||||
{}
|
||||
{"type": "end"}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{"type":"start", "id": 1, "mode": "normal", "user_id": 1}
|
||||
{"type":"start", "id": 1, "mode": "normal", "bearer": ""}
|
||||
{"type": "note_on", "id": 1, "time": 3250, "note": 68}
|
||||
{"type": "note_off", "id": 1, "time": 3490, "note": 68}
|
||||
{"type": "note_on", "id": 2, "time": 3500, "note": 67}
|
||||
@@ -19,5 +19,5 @@
|
||||
{"type": "note_off", "id": 9, "time": 6740, "note": 62}
|
||||
{"type": "note_on", "id": 10, "time": 6500, "note": 60}
|
||||
{"type": "note_off", "id": 10, "time": 6990, "note": 60}
|
||||
{}
|
||||
{"type": "end"}
|
||||
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
{"id": 8, "timingScore": "perfect", "timingInformation": "fast"}
|
||||
{"id": 9, "timingScore": "perfect", "timingInformation": "fast"}
|
||||
{"id": 10, "timingScore": "perfect", "timingInformation": "fast"}
|
||||
{"overallScore": 1000, "score": {}}
|
||||
{"overallScore": 1000, "score": {"missed": 0, "good": 0, "great": 0, "perfect": 0, "maxScore": 1000}}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{"type":"start", "id": 1, "mode": "normal", "user_id": 1}
|
||||
{"type":"start", "id": 1, "mode": "normal", "bearer": ""}
|
||||
{"type": "note_on", "id": 1, "time": 3500, "note": 68}
|
||||
{"type": "note_off", "id": 1, "time": 3740, "note": 68}
|
||||
{"type": "note_on", "id": 2, "time": 3750, "note": 67}
|
||||
@@ -15,5 +15,5 @@
|
||||
{"type": "note_off", "id": 7, "time": 4980, "note": 63}
|
||||
{"type": "note_on", "id": 8, "time": 5000, "note": 63}
|
||||
{"type": "note_off", "id": 8, "time": 5990, "note": 63}
|
||||
{}
|
||||
{"type": "end"}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{"type":"start", "id": 1, "mode": "normal", "user_id": 1}
|
||||
{"type":"start", "id": 1, "mode": "normal", "bearer": ""}
|
||||
{"type": "note_on", "id": 1, "time": 3500, "note": 68}
|
||||
{"type": "note_off", "id": 1, "time": 3540, "note": 68}
|
||||
{"type": "note_on", "id": 2, "time": 3750, "note": 67}
|
||||
@@ -19,5 +19,5 @@
|
||||
{"type": "note_off", "id": 9, "time": 6690, "note": 62}
|
||||
{"type": "note_on", "id": 10, "time": 6750, "note": 60}
|
||||
{"type": "note_off", "id": 10, "time": 6840, "note": 60}
|
||||
{}
|
||||
{"type": "end"}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{"type":"start", "id": 1, "mode": "normal", "user_id": 1}
|
||||
{"type":"start", "id": 1, "mode": "normal", "bearer": ""}
|
||||
{"type": "note_on", "id": 1, "time": 3500, "note": 68}
|
||||
{"type": "note_off", "id": 1, "time": 3990, "note": 68}
|
||||
{"type": "note_on", "id": 2, "time": 3750, "note": 67}
|
||||
@@ -19,5 +19,5 @@
|
||||
{"type": "note_off", "id": 9, "time": 7240, "note": 62}
|
||||
{"type": "note_on", "id": 10, "time": 6750, "note": 60}
|
||||
{"type": "note_off", "id": 10, "time": 7490, "note": 60}
|
||||
{}
|
||||
{"type": "end"}
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
{"type":"start", "id": 0, "mode": "normal", "user_id": 1}
|
||||
{"type":"start", "id": 0, "mode": "normal", "bearer": ""}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{"type":"start", "id": 1, "mode": "normal", "user_id": 1}
|
||||
{"type":"start", "id": 1, "mode": "normal", "bearer": ""}
|
||||
{"type": "note_on", "id": 1, "time": 3750, "note": 68}
|
||||
{"type": "note_off", "id": 1, "time": 3990, "note": 68}
|
||||
{"type": "note_on", "id": 2, "time": 4000, "note": 67}
|
||||
@@ -19,5 +19,5 @@
|
||||
{"type": "note_off", "id": 9, "time": 7240, "note": 62}
|
||||
{"type": "note_on", "id": 10, "time": 7000, "note": 60}
|
||||
{"type": "note_off", "id": 10, "time": 7490, "note": 60}
|
||||
{}
|
||||
{"type": "end"}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{"type":"start", "id": 1, "mode": "normal", "user_id": 1}
|
||||
{"type":"start", "id": 1, "mode": "normal", "bearer": ""}
|
||||
{"type": "note_on", "id": 1, "time": 3500, "note": 68}
|
||||
{"type": "note_off", "id": 1, "time": 3740, "note": 68}
|
||||
{"type": "note_on", "id": 2, "time": 3750, "note": 67}
|
||||
@@ -19,5 +19,5 @@
|
||||
{"type": "note_off", "id": 9, "time": 6990, "note": 62}
|
||||
{"type": "note_on", "id": 10, "time": 6750, "note": 60}
|
||||
{"type": "note_off", "id": 10, "time": 7240, "note": 60}
|
||||
{}
|
||||
{"type": "end"}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{"type":"start", "id": 1, "mode": "normal", "user_id": 1}
|
||||
{"type":"start", "id": 1, "mode": "normal", "bearer": ""}
|
||||
{"type": "note_on", "id": 1, "time": 3500, "note": 68}
|
||||
{"type": "note_off", "id": 1, "time": 3740, "note": 68}
|
||||
{"type": "note_on", "id": 3, "time": 4000, "note": 62}
|
||||
@@ -15,5 +15,5 @@
|
||||
{"type": "note_off", "id": 9, "time": 6990, "note": 62}
|
||||
{"type": "note_on", "id": 10, "time": 6750, "note": 60}
|
||||
{"type": "note_off", "id": 10, "time": 7240, "note": 60}
|
||||
{}
|
||||
{"type": "end"}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ TESTS_SUCCESS=0
|
||||
TESTS_FAILED=0
|
||||
|
||||
function test {
|
||||
cat $1/input | BACK_URL="http://localhost:3000" MUSICS_FOLDER="../../musics/" python3 ../main.py 1> /tmp/scorometer_res 2> /dev/null
|
||||
cat $1/input | BACK_URL="http://localhost:3000" MUSICS_FOLDER="../../musics/" python3 ../main.py 1> /tmp/scorometer_res 2> /tmp/scorometer_log
|
||||
TESTS_DONE=$((TESTS_DONE + 1))
|
||||
if ! diff $1/output /tmp/scorometer_res &>/dev/null; then
|
||||
echo "$t failed, do runner.sh $t for more info"
|
||||
@@ -27,7 +27,7 @@ then
|
||||
done
|
||||
exit $TESTS_FAILED
|
||||
else
|
||||
cat $1/input | BACK_URL="http://localhost:3000" MUSICS_FOLDER="../../musics/" python3 ../main.py 1> /tmp/scorometer_res 2> /dev/null
|
||||
cat $1/input | BACK_URL="http://localhost:3000" MUSICS_FOLDER="../../musics/" python3 ../main.py 1> /tmp/scorometer_res 2> /tmp/scorometer_log
|
||||
echo "=========== CURRENT OUTPUT ==========="
|
||||
cat /tmp/scorometer_res
|
||||
echo "======================================"
|
||||
|
||||
Reference in New Issue
Block a user