From 5e0a608ea60e51d3115ce239042063c929d78a7f Mon Sep 17 00:00:00 2001 From: Frank Schmitt Date: Mon, 19 Oct 2020 22:53:10 +0200 Subject: [PATCH] #1213 added very basic test file for D --- tests/syntax-tests/highlighted/D/test.d | 23 +++++++++++++++++++++++ tests/syntax-tests/source/D/test.d | 23 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 tests/syntax-tests/highlighted/D/test.d create mode 100644 tests/syntax-tests/source/D/test.d diff --git a/tests/syntax-tests/highlighted/D/test.d b/tests/syntax-tests/highlighted/D/test.d new file mode 100644 index 00000000..ef56cf18 --- /dev/null +++ b/tests/syntax-tests/highlighted/D/test.d @@ -0,0 +1,23 @@ +import std.stdio; +import std.algorithm; +import std.range; + +/* a multiline comment +* +*/ +int the_ultimate_answer() { + return 42; +} + +void main() +{ + // function call with string literal + writeln("Hello World!"); + + // an int array declaration + int[] arr1 = [1, 2, 3]; + // a double + double d1 = 3.14; + // another function call  + writefln("%s\n%s\n%s\n", arr1, d1, the_ultimate_answer()); +} diff --git a/tests/syntax-tests/source/D/test.d b/tests/syntax-tests/source/D/test.d new file mode 100644 index 00000000..c9bd263c --- /dev/null +++ b/tests/syntax-tests/source/D/test.d @@ -0,0 +1,23 @@ +import std.stdio; +import std.algorithm; +import std.range; + +/* a multiline comment +* +*/ +int the_ultimate_answer() { + return 42; +} + +void main() +{ + // function call with string literal + writeln("Hello World!"); + + // an int array declaration + int[] arr1 = [1, 2, 3]; + // a double + double d1 = 3.14; + // another function call + writefln("%s\n%s\n%s\n", arr1, d1, the_ultimate_answer()); +}