From 5b9edddb9d8a6eef5e59a9a8d5bde6b459283bf6 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Tue, 15 Jul 2008 08:20:21 +0200 Subject: [PATCH] [svn r389] Include std.outofmemory in testincludes. Fixes run/OutOfMemory_01, 02. --- tests/testincludes/Makefile | 1 + tests/testincludes/object.di | 5 +---- tests/testincludes/std/compat.d | 10 ++++++++++ tests/testincludes/std/outofmemory.d | 11 +++++++++++ 4 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 tests/testincludes/std/compat.d create mode 100644 tests/testincludes/std/outofmemory.d diff --git a/tests/testincludes/Makefile b/tests/testincludes/Makefile index 5aec1e56..f40a3505 100644 --- a/tests/testincludes/Makefile +++ b/tests/testincludes/Makefile @@ -57,6 +57,7 @@ lib : tangobos.lib OBJ_CORE= \ std/gc.bc \ + std/outofmemory.bc \ # std/asserterror.bc \ # std/math.bc \ # std/stdarg.bc diff --git a/tests/testincludes/object.di b/tests/testincludes/object.di index d727d16c..a0547afa 100644 --- a/tests/testincludes/object.di +++ b/tests/testincludes/object.di @@ -5,10 +5,7 @@ module object; -alias char[] string; -alias wchar[] wstring; -alias dchar[] dstring; -alias Exception Error; +import std.compat; alias typeof(int.sizeof) size_t; alias typeof(cast(void*)0 - cast(void*)0) ptrdiff_t; diff --git a/tests/testincludes/std/compat.d b/tests/testincludes/std/compat.d new file mode 100644 index 00000000..d977473d --- /dev/null +++ b/tests/testincludes/std/compat.d @@ -0,0 +1,10 @@ +module std.compat; + +extern (C) int printf(char *, ...); + +alias char[] string; +alias wchar[] wstring; +alias dchar[] dstring; + +alias Exception Error; +alias bool bit; diff --git a/tests/testincludes/std/outofmemory.d b/tests/testincludes/std/outofmemory.d new file mode 100644 index 00000000..c8339736 --- /dev/null +++ b/tests/testincludes/std/outofmemory.d @@ -0,0 +1,11 @@ +module std.outofmemory; +import std.compat; + +public import tango.core.Exception; + +extern (C) void _d_OutOfMemory() +{ + throw cast(OutOfMemoryException) + cast(void *) + OutOfMemoryException.classinfo.init; +}