File tree Expand file tree Collapse file tree 5 files changed +32
-2
lines changed Expand file tree Collapse file tree 5 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ install:
1212 - npm install -D
1313 - docker pull codingblocks/judge-worker-c
1414 - docker pull codingblocks/judge-worker-cpp
15+ - docker pull codingblocks/judge-worker-csharp
1516 - docker pull codingblocks/judge-worker-java8
1617 - docker pull codingblocks/judge-worker-py2
1718 - docker pull codingblocks/judge-worker-py3
Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ exports = module.exports = {
2424 CPU_SHARE : "0.5" ,
2525 MEM_LIMIT : '100m'
2626 } ,
27+ 'csharp' : {
28+ SOURCE_FILE : 'program.cs' ,
29+ CPU_SHARE : '1.2' ,
30+ MEM_LIMIT : '500m' ,
31+ } ,
2732 'py2' : {
2833 SOURCE_FILE : 'script.py' ,
2934 CPU_SHARE : "0.8" ,
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import {expect} from 'chai'
55describe ( 'run - c' , ( ) => {
66 it ( '.c file runs correctly' , ( ) => {
77 execRun ( {
8- id : 20 ,
8+ id : 19 ,
99 lang : 'c' ,
1010 source : ( new Buffer ( `
1111#include <stdio.h>
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import {expect} from 'chai'
55describe ( 'run - cpp' , ( ) => {
66 it ( '.cpp file runs correctly' , ( ) => {
77 execRun ( {
8- id : 21 ,
8+ id : 20 ,
99 lang : 'cpp' ,
1010 source : ( new Buffer ( `
1111#include <iostream>
Original file line number Diff line number Diff line change 1+ import { execRun } from '../src/tasks/run'
2+ import { expect } from 'chai'
3+
4+
5+ describe ( 'run - csharp' , ( ) => {
6+ it ( '.cs file runs correctly' , ( ) => {
7+ execRun ( {
8+ id : 21 ,
9+ lang : 'csharp' ,
10+ source : ( new Buffer ( `
11+ using System;
12+
13+ public class HelloWorld {
14+ static public void Main () {
15+ Console.WriteLine ("Hello " + Console.ReadLine());
16+ }
17+ }
18+ ` ) ) . toString ( 'base64' ) ,
19+ stdin : ( new Buffer ( 'World' ) ) . toString ( 'base64' )
20+ } , ( runResult ) => {
21+ expect ( new Buffer ( runResult . stdout , 'base64' ) . toString ( 'ascii' ) ) . to . eq ( 'Hello World\n' )
22+ } )
23+ } )
24+ } )
You can’t perform that action at this time.
0 commit comments