Documentation
¶
Index ¶
- Constants
- type Golang
- func (Golang) Compile(ctx context.Context, s sandbox.Sandbox, f sandbox.File, stderr io.Writer, ...) (*sandbox.File, error)
- func (Golang) DefaultFilename() string
- func (Golang) DisplayName() string
- func (Golang) ID() string
- func (Golang) Run(ctx context.Context, s sandbox.Sandbox, binary sandbox.File, stdin io.Reader, ...) (*sandbox.Status, error)
- func (g Golang) Test(t *testing.T, s sandbox.Sandbox) error
Constants ¶
View Source
const ( TestCodeAplusb = `package main import ( "fmt" ) func main() { a,b := 0,0 fmt.Scanf("%d %d", &a, &b) fmt.Println(a+b) }` TestCodeCompilationError = `pkgace main import ( "fmt" ) func main() { fmt.Println("lol") } ` TestCodeHelloWorld = `package main import ( "fmt" ) func main() { fmt.Println("Hello world") }` TestCodeTimeLimit = `package main func main() { a := 0 for 1==1 { a++ } }` TestCodeRuntimeError = `package main func dfs(x int) { dfs(x+1) if x==1000000000 { return } } func main() { dfs(-1000) }` TestCodeRuntimeErrorDiv0 = `package main import ( "fmt" ) func main() { a := 1 b := 0 fmt.Println(a/b) }` )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Golang ¶
type Golang struct{}
func (Golang) DefaultFilename ¶
func (Golang) DisplayName ¶
Click to show internal directories.
Click to hide internal directories.