on master help sign in
#1213 added very basic test file for D
commit5e0a608ea60e51d3115ce239042063c929d78a7f authorFrank Schmitt <frankschmitt@gmx.de> dateMon 19 Oct 2020, 22:53 (6 years ago) parent3729aef
2 files changed+46
tests/syntax-tests/highlighted/D/test.d+23 tests/syntax-tests/source/D/test.d+23
tests/syntax-tests/highlighted/D/test.dnew file+23
@@ -0,0 +1,23 @@
1+import std.stdio;
2+import std.algorithm;
3+import std.range;
4+
5+/* a multiline comment
6+*
7+*/
8+int the_ultimate_answer() {
9+ return 42;
10+}
11+
12+void main()
13+{
14+ // function call with string literal
15+ writeln("Hello World!");
16+
17+ // an int array declaration
18+ int[] arr1 = [1, 2, 3];
19+ // a double
20+ double d1 = 3.14;
21+ // another function call 
22+ writefln("%s\n%s\n%s\n", arr1, d1, the_ultimate_answer());
23+}
tests/syntax-tests/source/D/test.dnew file+23
@@ -0,0 +1,23 @@
1+import std.stdio;
2+import std.algorithm;
3+import std.range;
4+
5+/* a multiline comment
6+*
7+*/
8+int the_ultimate_answer() {
9+ return 42;
10+}
11+
12+void main()
13+{
14+ // function call with string literal
15+ writeln("Hello World!");
16+
17+ // an int array declaration
18+ int[] arr1 = [1, 2, 3];
19+ // a double
20+ double d1 = 3.14;
21+ // another function call
22+ writefln("%s\n%s\n%s\n", arr1, d1, the_ultimate_answer());
23+}