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
9c1f1cf1
Commit
9c1f1cf1
authored
Oct 31, 2018
by
tnstrssnr
Committed by
Johannes Bucher
Nov 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add parser tests
parent
c0d0d441
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
80 additions
and
0 deletions
+80
-0
syntax/a_very_long_expression.mj
syntax/a_very_long_expression.mj
+5
-0
syntax/array_access.invalid.mj
syntax/array_access.invalid.mj
+6
-0
syntax/different_field_types.mj
syntax/different_field_types.mj
+10
-0
syntax/different_method_types.mj
syntax/different_method_types.mj
+18
-0
syntax/extra_comma_after_parameters.invalid.mj
syntax/extra_comma_after_parameters.invalid.mj
+3
-0
syntax/fibonacci.mj
syntax/fibonacci.mj
+15
-0
syntax/invalid_class_decl.invalid.mj
syntax/invalid_class_decl.invalid.mj
+5
-0
syntax/missing_parentheses_expression.invalid.mj
syntax/missing_parentheses_expression.invalid.mj
+9
-0
syntax/new_array_with_many_brackets.mj
syntax/new_array_with_many_brackets.mj
+6
-0
syntax/wrong_main_return_type.invalid.java
syntax/wrong_main_return_type.invalid.java
+3
-0
No files found.
syntax/a_very_long_expression.mj
0 → 100644
View file @
9c1f1cf1
This diff is collapsed.
Click to expand it.
syntax/array_access.invalid.mj
0 → 100644
View file @
9c1f1cf1
class A {
public int a;
public void method() {
a = array[4][];
}
}
\ No newline at end of file
syntax/different_field_types.mj
0 → 100644
View file @
9c1f1cf1
class A {
public int field;
public CustomType field;
public boolean field;
public void field;
public int[] field;
public CustomType[] field;
public boolean[] field;
public void[][][][][][] field;
}
\ No newline at end of file
syntax/different_method_types.mj
0 → 100644
View file @
9c1f1cf1
class A {
public int method() {}
public boolean method() {}
public void method() {}
public CustomType method() {}
public int[] method() {}
public boolean[] method() {}
public void[] method() {}
public CustomType[] method() {}
public int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][] method() {}
public boolean[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][] method() {}
public void[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][] method() {}
public CustomType[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][] method() {}
public int[] method(int parameter, int parameter, int parameter, int parameter, int parameter, int parameter) {}
}
\ No newline at end of file
syntax/extra_comma_after_parameters.invalid.mj
0 → 100644
View file @
9c1f1cf1
class A {
public int[] method(int parameter, int parameter, int parameter, int parameter, int parameter, int parameter,) {}
}
\ No newline at end of file
syntax/fibonacci.mj
0 → 100644
View file @
9c1f1cf1
class FibonacciRecursive {
public static void main(String[] args) {
int a = 10;
int f = fibonacci(a);
}
public int fibonacci(int n) {
if(n <= 1) {
return n;
} else {
return fibonacci(n - 1) + fibonacci(n - 2);
}
}
}
syntax/invalid_class_decl.invalid.mj
0 → 100644
View file @
9c1f1cf1
class 42 {
public static void main() {
int x = 42;
}
}
syntax/missing_parentheses_expression.invalid.mj
0 → 100644
View file @
9c1f1cf1
class X {
public static void main(String[] args) {
int a = 0;
int b = 2;
int c = 5;
int d;
d = ((((a + b) * c) - a) / (c % d + ((b - 1) * c));
}
}
syntax/new_array_with_many_brackets.mj
0 → 100644
View file @
9c1f1cf1
class A {
public type a;
public void method() {
a = new array[5][][][][][][][][][][][][];
}
}
\ No newline at end of file
syntax/wrong_main_return_type.invalid.java
0 → 100644
View file @
9c1f1cf1
class
A
{
public
static
int
main
(
String
[]
args
)
{}
}
\ No newline at end of file
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