#1213 added very basic test file for D

This commit is contained in:
Frank Schmitt 2020-10-19 22:53:10 +02:00 committed by David Peter
parent 3729aefb6f
commit 5e0a608ea6
2 changed files with 46 additions and 0 deletions

View file

@ -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());
}

View file

@ -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());
}