mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
samples: add Terra samples
source: https://github.com/zdevito/terra/tree/master/tests
This commit is contained in:
19
samples/Terra/opaquealloc.t
Normal file
19
samples/Terra/opaquealloc.t
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
|
||||
|
||||
local r,e = pcall(function()
|
||||
local struct A {
|
||||
a : opaque
|
||||
}
|
||||
local v = terralib.new(A)
|
||||
end)
|
||||
|
||||
assert(not r and e:match("Errors reported during"))
|
||||
|
||||
|
||||
local r,e = pcall(function()
|
||||
local v = terralib.new(opaque)
|
||||
end)
|
||||
|
||||
|
||||
assert(not r and e:match("attempting to use an opaque type"))
|
||||
Reference in New Issue
Block a user