summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Makefile4
-rw-r--r--test/cvtest.d39
2 files changed, 41 insertions, 2 deletions
diff --git a/test/Makefile b/test/Makefile
index 43e0f17..edba402 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -6,7 +6,7 @@ SRC = cvtest.d
DBGDIR = ..\bin\Debug
RELDIR = ..\bin\Release
-DMD = c:\l\dmd-2.040\windows\bin\dmd.exe
+DMD = c:\l\dmd2\windows\bin\dmd.exe
# DMD = c:\l\dmd-1.045\windows\bin\dmd.exe
CV2PDB_DBG = $(DBGDIR)\cv2pdb.exe
@@ -23,7 +23,7 @@ rel_exe: $(RELDIR)\$(PROJECT).exe
######################
$(DBGDIR)\$(PROJECT).exe : $(DBGDIR)\$(PROJECT)_cv.exe $(CV2PDB_DBG)
- $(CV2PDB_DBG) $(DBGDIR)\$(PROJECT)_cv.exe $@
+ $(CV2PDB_DBG) -D2.043 $(DBGDIR)\$(PROJECT)_cv.exe $@
$(DBGDIR)\$(PROJECT)_cv.exe : $(SRC) Makefile
$(DMD) -of$@ -g -unittest $(DFLAGS) @<<
diff --git a/test/cvtest.d b/test/cvtest.d
index f504500..5deae42 100644
--- a/test/cvtest.d
+++ b/test/cvtest.d
@@ -156,6 +156,41 @@ version(D2)
}
}
+class A
+{
+ static int outer_func(int x)
+ {
+ int inner_func(int y)
+ {
+ return x * y;
+ }
+ return inner_func(2);
+ }
+}
+
+A outer_func(int x)
+{
+ int inner_func(int y)
+ {
+ return x * y;
+ }
+ inner_func(3);
+ return new A;
+}
+
+int arrays()
+{
+ int[] iarr;
+ iarr ~= 4;
+
+ void[] varr;
+ varr = new char[102];
+
+ const void[] cvarr;
+
+ return iarr.length;
+}
+
int main2(char[][]argv)
{
enum_name inst_enum = enum_name.kEnum2;
@@ -208,6 +243,10 @@ int main(char[][]argv)
{
long lng = 3;
+ arrays();
+ outer_func(3);
+ A.outer_func(3);
+
main2(argv);
writefln("Hello world");