mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-15 08:03:46 +00:00
fixes tests
This commit is contained in:
@@ -30,11 +30,11 @@ var s = bork()
|
||||
import tables
|
||||
|
||||
type
|
||||
cdbl {.importc: "double".} = object
|
||||
cdbl {.importc: "double", nodecl.} = object
|
||||
|
||||
MyObject = ref object of RootObj
|
||||
y: Table[string, cdbl]
|
||||
|
||||
|
||||
|
||||
proc test =
|
||||
var x = new(MyObject)
|
||||
|
||||
@@ -140,7 +140,7 @@ block: # bug #9940
|
||||
typedef struct { int base; } S;
|
||||
""".}
|
||||
|
||||
type S {.importc: "S", completeStruct.} = object
|
||||
type S {.importc: "S", nodecl, completeStruct.} = object
|
||||
base: cint
|
||||
proc init(x:ptr S) =
|
||||
x.base = 1
|
||||
|
||||
@@ -15,7 +15,7 @@ struct SystemManager {
|
||||
|
||||
""".}
|
||||
|
||||
type Input {.importcpp: "System::Input".} = object
|
||||
type Input {.importcpp: "System::Input", nodecl.} = object
|
||||
proc getSubsystem*[T](): ptr T {.
|
||||
importcpp: "SystemManager::getSubsystem<'*0>()", nodecl.}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ template ensureCgen(T: typedesc) =
|
||||
var a {.volatile.}: T
|
||||
|
||||
block:
|
||||
type Foo1Alias{.importc: "struct Foo1", size: sizeof(cint).} = object
|
||||
type Foo1Alias{.importc: "struct Foo1", nodecl, size: sizeof(cint).} = object
|
||||
a: cint
|
||||
ensureCgen Foo1Alias
|
||||
|
||||
|
||||
@@ -488,7 +488,7 @@ typedef struct{
|
||||
""".}
|
||||
|
||||
type
|
||||
Foo {.importc.} = object
|
||||
Foo {.importc, nodecl.} = object
|
||||
|
||||
Bar = object
|
||||
b: byte
|
||||
@@ -549,7 +549,7 @@ doAssert alignof(MyCustomAlignObject) == 32
|
||||
##########################################
|
||||
|
||||
type
|
||||
imported_double {.importc: "double".} = object
|
||||
imported_double {.importc: "double", nodecl.} = object
|
||||
|
||||
Pod = object
|
||||
v* : imported_double
|
||||
|
||||
@@ -15,7 +15,7 @@ cimported set1_imported(double x) {
|
||||
|
||||
"""}
|
||||
|
||||
type vfloat{.importc: "cimported".} = object
|
||||
type vfloat{.importc: "cimported", nodecl.} = object
|
||||
|
||||
proc set1(a: float): vfloat {.importc: "set1_imported".}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user