Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mjtest-tests
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uydwl
mjtest-tests
Commits
4b78c8d3
Unverified
Commit
4b78c8d3
authored
Nov 15, 2018
by
Joshua Bachmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More tests
parent
318228bb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
0 deletions
+34
-0
expression_statement.invalid.java
expression_statement.invalid.java
+6
-0
semantic/array_out_of_bounds.java
semantic/array_out_of_bounds.java
+7
-0
semantic/namespaces.java
semantic/namespaces.java
+12
-0
semantic/new_array_access.mj
semantic/new_array_access.mj
+9
-0
No files found.
expression_statement.invalid.java
0 → 100644
View file @
4b78c8d3
class
ExprStmt
{
public
int
foo
()
{}
public
static
void
main
(
String
[]
args
)
{
foo
()
+
foo
();
}
}
semantic/array_out_of_bounds.java
0 → 100644
View file @
4b78c8d3
class
ArrayOutOfBounds
{
public
static
void
main
(
String
[]
args
)
{
int
[]
x
=
new
int
[
5
];
/* This is a runtime error, the compiler shouldn't care */
int
y
=
x
[
10
];
}
}
semantic/namespaces.java
0 → 100644
View file @
4b78c8d3
class
Foo
{
Foo
Foo
;
Foo
Foo
(
Foo
Foo
)
{
Foo
.
Foo
=
new
Foo
();
return
Foo
;
}
public
static
void
main
(
String
[]
args
)
{
Foo
=
Foo
(
new
Foo
());
}
}
semantic/new_array_access.mj
0 → 100644
View file @
4b78c8d3
class NewArrayAccess {
public static void main(String[] args) {
/*
* In Java, this is invalid, since this creates a new 2D array (which is not the type of x)
* In MiniJava, this is valid, because this creates a new array of size 5 and access the first element
*/
int x = new int[5][1];
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment