mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-17 05:13:14 +01:00
[svn r389] Include std.outofmemory in testincludes.
Fixes run/OutOfMemory_01, 02.
This commit is contained in:
@@ -57,6 +57,7 @@ lib : tangobos.lib
|
||||
|
||||
OBJ_CORE= \
|
||||
std/gc.bc \
|
||||
std/outofmemory.bc \
|
||||
# std/asserterror.bc \
|
||||
# std/math.bc \
|
||||
# std/stdarg.bc
|
||||
|
||||
@@ -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;
|
||||
|
||||
10
tests/testincludes/std/compat.d
Normal file
10
tests/testincludes/std/compat.d
Normal file
@@ -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;
|
||||
11
tests/testincludes/std/outofmemory.d
Normal file
11
tests/testincludes/std/outofmemory.d
Normal file
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user