Ejemplo n.º 1
0
LANG_PHP = "PHP"
LANG_PYTHON = "Python 2 / CPython"
ALL_LANGUAGES = (LANG_CPP, LANG_C, LANG_HS, LANG_JAVA, LANG_PASCAL, LANG_PHP,
                 LANG_PYTHON)
NON_INTERPRETED_LANGUAGES = (LANG_C, LANG_CPP, LANG_PASCAL)
COMPILED_LANGUAGES = (LANG_C, LANG_CPP, LANG_PASCAL, LANG_JAVA, LANG_PYTHON,
                      LANG_HS)

ALL_TESTS = [

    # Correct solutions to batch tasks.
    Test('correct-stdio',
         task=batch_stdio,
         filenames=['correct-stdio.%l'],
         languages=ALL_LANGUAGES,
         checks=[CheckOverallScore(100, 100)]),
    Test('correct-freopen',
         task=batch_fileio,
         filenames=['correct-freopen.%l'],
         languages=(LANG_C, ),
         checks=[CheckOverallScore(100, 100)],
         user_tests=True),
    Test('correct-stdio-inner-class',
         task=batch_stdio,
         filenames=['correct-stdio-inner-class.%l'],
         languages=(LANG_JAVA, ),
         checks=[CheckOverallScore(100, 100)]),
    Test('correct-fileio',
         task=batch_fileio,
         filenames=['correct-fileio.%l'],
         languages=ALL_LANGUAGES,
Ejemplo n.º 2
0
import cmstestsuite.tasks.batch_stdio as batch_stdio
import cmstestsuite.tasks.batch_fileio as batch_fileio
import cmstestsuite.tasks.batch_fileio_managed as batch_fileio_managed
import cmstestsuite.tasks.communication as communication
from cmstestsuite.Test import Test, CheckOverallScore, CheckCompilationFail, \
     CheckTimeout, CheckNonzeroReturn


all_languages = ('c', 'cpp', 'pas')

ALL_TESTS = [

Test('correct-stdio',
     task=batch_stdio, filename='correct-stdio.%l',
     languages=all_languages,
     checks=[CheckOverallScore(100, 100)]),

Test('incorrect-stdio',
     task=batch_stdio, filename='incorrect-stdio.%l',
     languages=all_languages,
     checks=[CheckOverallScore(0, 100)]),

Test('half-correct-stdio',
     task=batch_stdio, filename='half-correct-stdio.%l',
     languages=all_languages,
     checks=[CheckOverallScore(50, 100)]),

Test('correct-freopen',
     task=batch_fileio, filename='correct-freopen.%l',
     languages=('c',),
     checks=[CheckOverallScore(100, 100)]),
Ejemplo n.º 3
0
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

import cmstestsuite.tasks.batch_stdio as batch_stdio
import cmstestsuite.tasks.batch_fileio as batch_fileio
from cmstestsuite.Test import Test, CheckOverallScore, CheckCompilationFail, \
     CheckTimeout, CheckForbiddenSyscall, CheckSignal, CheckNonzeroReturn


all_languages = ('c', 'cpp', 'pas')

ALL_TESTS = [

Test('correct-stdio',
     task=batch_stdio, filename='correct-stdio.%l',
     languages=all_languages,
     checks=[CheckOverallScore(100, 100)]),

Test('incorrect-stdio',
     task=batch_stdio, filename='incorrect-stdio.%l',
     languages=all_languages,
     checks=[CheckOverallScore(0, 100)]),

Test('half-correct-stdio',
     task=batch_stdio, filename='half-correct-stdio.%l',
     languages=all_languages,
     checks=[CheckOverallScore(50, 100)]),

Test('correct-freopen',
     task=batch_fileio, filename='correct-freopen.%l',
     languages=('c',),
     checks=[CheckOverallScore(100, 100)]),
Ejemplo n.º 4
0
    LANG_RUST, LANG_C_SHARP
)
NON_INTERPRETED_LANGUAGES = (LANG_C, LANG_CPP, LANG_PASCAL)
COMPILED_LANGUAGES = (
    LANG_C, LANG_CPP, LANG_PASCAL, LANG_JAVA, LANG_PYTHON, LANG_HS, LANG_RUST,
    LANG_C_SHARP
)

ALL_TESTS = [

    # Correct solutions to batch tasks.

    Test('correct-stdio',
         task=batch_stdio, filenames=['correct-stdio.%l'],
         languages=ALL_LANGUAGES,
         checks=[CheckOverallScore(100, 100)]),

    Test('correct-freopen',
         task=batch_fileio, filenames=['correct-freopen.%l'],
         languages=(LANG_C,),
         checks=[CheckOverallScore(100, 100)],
         user_tests=True),

    Test('correct-stdio-inner-class',
         task=batch_stdio, filenames=['correct-stdio-inner-class.%l'],
         languages=(LANG_JAVA, LANG_C_SHARP),
         checks=[CheckOverallScore(100, 100)]),

    Test('correct-fileio',
         task=batch_fileio, filenames=['correct-fileio.%l'],
         languages=ALL_LANGUAGES,