Initialize

This commit is contained in:
ChenKaiLiuG
2026-01-29 11:48:45 +08:00
parent 8579a2f732
commit e139daa410
20 changed files with 1228 additions and 1 deletions

67
utils/test-data.ts Normal file
View File

@@ -0,0 +1,67 @@
/**
* Test data and credentials for E2E tests
*/
export const TEST_USER = {
email: process.env.TEST_EMAIL || 'fsdoiujfs@example.org',
password: process.env.TEST_PASSWORD || 'Fsdoiujfs',
};
export const BASE_URL = process.env.BASE_URL || 'https://tobiichi3227.eu.org:312';
/**
* Sample code submissions for testing
*/
export const CODE_SAMPLES = {
// Simple A+B problem solution in C++
cpp_aplusb: `#include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << a + b << endl;
return 0;
}`,
// Python A+B solution
python_aplusb: `a, b = map(int, input().split())
print(a + b)`,
// Wrong answer example
cpp_wrong: `#include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << 0 << endl; // Always output 0 (wrong answer)
return 0;
}`,
// Time Limit Exceeded example
cpp_tle: `#include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
while(true) {} // Infinite loop
return 0;
}`,
};
/**
* Expected verdict states
*/
export const VERDICTS = {
AC: 'AC',
WA: 'WA',
TLE: 'TLE',
MLE: 'MLE',
RE: 'RE',
CE: 'CE',
IE: 'IE',
CHALLENGING: 'Challenging',
NOT_STARTED: 'Not Started',
} as const;