From bba4865a783802e59e8d145667159e5c7f93ade5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Czech?= Date: Mon, 11 Mar 2024 21:56:15 +0100 Subject: [PATCH] Add tests --- tests/packages/gen/no-precompile | 0 tests/packages/gen/prog/geningen5.cpp | 4 ++++ tests/packages/wer/no-precompile | 0 tests/packages/wer/prog/werinwer.cpp | 4 ++++ 4 files changed, 8 insertions(+) create mode 100644 tests/packages/gen/no-precompile create mode 100644 tests/packages/wer/no-precompile diff --git a/tests/packages/gen/no-precompile b/tests/packages/gen/no-precompile new file mode 100644 index 00000000..e69de29b diff --git a/tests/packages/gen/prog/geningen5.cpp b/tests/packages/gen/prog/geningen5.cpp index ee2ff2bf..c086786b 100644 --- a/tests/packages/gen/prog/geningen5.cpp +++ b/tests/packages/gen/prog/geningen5.cpp @@ -3,6 +3,7 @@ using namespace std; int main() { + #ifdef _INGEN ofstream f("gen1.in"); f << "1 2\n"; f.close(); @@ -10,4 +11,7 @@ int main() { f.open("gen2.in"); f << "2 3\n"; f.close(); + #else + This should not compile + #endif } diff --git a/tests/packages/wer/no-precompile b/tests/packages/wer/no-precompile new file mode 100644 index 00000000..e69de29b diff --git a/tests/packages/wer/prog/werinwer.cpp b/tests/packages/wer/prog/werinwer.cpp index c6a54564..7e925f82 100644 --- a/tests/packages/wer/prog/werinwer.cpp +++ b/tests/packages/wer/prog/werinwer.cpp @@ -3,6 +3,7 @@ using namespace std; int main() { + #ifdef _INWER int n, a; cin >> n; for (int i = 0; i < n; i++) { @@ -16,4 +17,7 @@ int main() { cout << "OK" << endl << "Group " << n - 1 << endl; return 0; + #else + This should not compile + #endif }