-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
48 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/perl | ||
|
||
use warnings; | ||
use strict; | ||
|
||
use Test::More; | ||
|
||
my $C2FFI = $ENV{'C2FFI'} || 'c2ffi'; | ||
|
||
plan tests => 1; | ||
|
||
my $header = 't/headers/struct-members.h'; | ||
my $res = system("$C2FFI $header > struct-members-output"); | ||
if ($res != 0) { | ||
die "$C2FFI against $header failed."; | ||
} | ||
|
||
my @lines = | ||
map { chomp; $_ } | ||
`cat struct-members-output | ./dale-autowrap --casing lisp`; | ||
is_deeply(\@lines, | ||
[split /\n/, <<EOF], | ||
(def test-struct (struct extern ((first-element int) (second-element int)))) | ||
EOF | ||
"Struct elements cased correctly"); | ||
unlink("struct-members-output"); | ||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
typedef struct { int firstElement; int secondElement; } testStruct; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(def testStruct (struct extern ((firstElement int) (secondElement int)))) |