Polyman Documentation - v3.0.0
    Preparing search index...

    Function includesTestlibFirst

    • Whether a source includes testlib.h before anything that could change how testlib compiles. testlib reads configuration macros (EJUDGE, USE_RND_AS_BEFORE_087, ...), so a source that defines anything, uses a pragma, or declares code before the include must compile against the original header. Standard library includes are allowed.

      Parameters

      • source: string

        Contents of a generator, validator, checker or solution

      Returns boolean

      True when the prebuilt testlib object can be linked

      includesTestlibFirst('#include "testlib.h"\nint main() {}'); // true
      includesTestlibFirst('#define EJUDGE\n#include "testlib.h"'); // false