https://github.com/shapelayer/polygon-testlib-wrapper
Polygon testlib.h function wrapper for local testing
https://github.com/shapelayer/polygon-testlib-wrapper
codeforces codeforces-polygon polygon testlib
Last synced: 12 months ago
JSON representation
Polygon testlib.h function wrapper for local testing
- Host: GitHub
- URL: https://github.com/shapelayer/polygon-testlib-wrapper
- Owner: ShapeLayer
- License: mit
- Created: 2024-04-12T06:19:41.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-14T04:02:37.000Z (almost 2 years ago)
- Last Synced: 2024-04-14T04:24:49.348Z (almost 2 years ago)
- Topics: codeforces, codeforces-polygon, polygon, testlib
- Language: C++
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Polygon testlib.h wrapper
Simple testlib.h wrapper to run polygon requirements locally.
## How to Use
Copy [`main.cpp`](./main.cpp) and add code to `int main(int argc, char* argv[])` or replace testlib.h function to wrapper function.
## Supports
Coverage
* Fully Covered
* Supports almost same function at local.
* Just Wrapped
* Just passes at local.
* Not Supported
| testlib.h | wrapper fn | coverage |
| :-: | :-: | :-: |
| `registerGen(int argc, char* argv[])` | `w_register(int argc, char* argv[])` |  [^1] |
| `rnd.next(int n)` | `w_rnd_next(int n)` |  |
| `rnd.next(int L, int R)` | `w_rnd_next(int init, int fin)` |  |
| `rnd.next(double n)` | - |  |  |
| `rnd.next(string pattern)` | - |  |  |
| `rnd.wnext(int n, int t)` | - |  |  |
| `rnd.any(container)` | - |  |  |
[^1]: `IS_GENERATOR` must be `true`
| testlib.h | wrapper fn | coverage |
| :-: | :-: | :-: |
| `void registerValidation(int argc, char* argv[])` | `void w_register(int argc, char* argv[])` |  [^2] |
| `void setTestCase(int T)` | - |  |  |
| `void unsetTestCase()` | - |  |  |
| `string validator.testset()` | - |  |  |
| `string validator.group()` | - |  |  |
| `void ensure(bool cond)` | `void w_ensure(bool cond)` |  |
| `void ensuref(bool cond, char *format, ...)` | `void w_ensuref(bool cond, char *format)` |  |
[^2]: `IS_VALIDATOR` must be `true`
| testlib.h | wrapper fn | coverage |
| :-: | :-: | :-: |
| `char readChar()` | `char w_readChar()` |  |
| `char readChar(char c)` | `char w_readChar(char c)` |  |
| `char readSpace()` | `char w_readSpace()` |  |
| `void unreadChar(char c)` | - |  |  |
| `string readToken()` | `string w_readToken()` |  |
| `string readToken(string regex)` | - |  |  |
| `string readWord()` | `string w_readWord()` |  |
| `string readWord(string regex)` | - |  |  |
| `long long readLong()` | `i64 w_readLong()` |  |
| `long long readLong(long long L, long long R)` | `i64 w_readLong(i64 L, i64 R)` |  |
| `vector readLongs(int n, long long L, long long R)` | - |  |  |
| `int readInt()` | `int w_readInt()` |  |
| `int readInteger()` | `int w_readInteger()` |  |
| `int readInt(int L, int R)` | `int w_readInt(int L, int R)` |  |
| `int readInteger(int L, int R)` | `int w_readInteger(int L, int R)` |  |
| `vector readInts(int n, int L, int R)` | - |  |
| `vector readIntegers(int n, int L, int R)` | - |  |
| `double readReal()` | `double w_readReal()` |  |
| `double readDouble()` | `double w_readDouble()` |  |
| `double readReal(double L, double R)` | `double w_readReal(double L, double R)` |  |
| `double readDouble(double L, double R)` |`double w_readDouble(double L, double R)` |  |
| `double readStrictReal(double L, double R, int minPrecision, int maxPrecision)` | - |  |
| `double readStrictDouble(double L, double R, int minPrecision, int maxPrecision)` | - |  |
| `string readString()` | `string w_readString()` |  |
| `string readLine()` | `string w_readLine()` |  |
| `string readString(string regex)` | - |  |
| `string readLine(string regex)` | - |  |
| `void readEoln()` | `void w_readEoln()` |  |
| `void readEof()` | `void w_readEof()` |  |
| testlib.h | wrapper fn | coverage |
| :-: | :-: | :-: |
| (All functions of Checkers) | - |  |
| testlib.h | wrapper fn | coverage |
| :-: | :-: | :-: |
| (All functions of Interactors) | - |  |