mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 20:17:42 +00:00
26 lines
369 B
Nim
26 lines
369 B
Nim
discard """
|
|
cmd: "nim cpp --nimbasepattern:test.h --cincludes:./tests/options $file "
|
|
output:'''
|
|
(a: 1)
|
|
'''
|
|
"""
|
|
const header = """
|
|
#pragma once
|
|
#include "nimbase.h"
|
|
struct Foo {
|
|
int a;
|
|
};
|
|
"""
|
|
|
|
import os
|
|
static:
|
|
const dir = "./tests/options/"
|
|
createDir(dir)
|
|
writeFile(dir / "test.h", header)
|
|
|
|
type
|
|
Foo {.importc.} = object
|
|
a: int32 = 1
|
|
|
|
|
|
echo $Foo() |