Putting complete covering of bit casts on hold for now
This commit is contained in:
parent
80e310010e
commit
ee02e71b1d
|
@ -87,42 +87,43 @@ define void @"0zNZN147MN2wzMAQ6NS2dQ==::main"() {
|
|||
`)
|
||||
}
|
||||
|
||||
// TODO: within this test, cast all possible type kinds to a pointer and back.
|
||||
// Perhaps run all generator output in these tests through llc to check the
|
||||
// TODO: Perhaps run all generator output in these tests through llc to check the
|
||||
// integrity of the IR.
|
||||
func TestBitCastPointer (test *testing.T) {
|
||||
testString (test,
|
||||
`
|
||||
`,
|
||||
`
|
||||
Struct: (. x:Int y:Int)
|
||||
Array: 4:Int
|
||||
[main] = {
|
||||
ptr:*Byte
|
||||
stc:Struct
|
||||
arr:Array
|
||||
str:String
|
||||
flt:F64
|
||||
idx:Index
|
||||
|
||||
; struct
|
||||
ptr = [~~*Byte [~~Struct ptr]]
|
||||
stc = [~~Struct [~~*Byte stc]]
|
||||
; array
|
||||
ptr = [~~*Byte [~~Array ptr]]
|
||||
arr = [~~Array [~~*Byte arr]]
|
||||
; slice
|
||||
ptr = [~~*Byte [~~String ptr]]
|
||||
str = [~~String [~~*Byte str]]
|
||||
; int
|
||||
ptr = [~~*Byte [~~Index ptr]]
|
||||
idx = [~~Index [~~*Byte idx]]
|
||||
; float
|
||||
ptr = [~~*Byte [~~F64 ptr]]
|
||||
flt = [~~F64 [~~*Byte flt]]
|
||||
|
||||
; arithmetic
|
||||
ptr = [~~*Byte [+ 1 [~~Index ptr]]]
|
||||
}
|
||||
`)
|
||||
}
|
||||
// TODO: uncomment and complete once bitcasting is fully supported
|
||||
// func TestBitCastPointer (test *testing.T) {
|
||||
// testString (test,
|
||||
// `
|
||||
// `,
|
||||
// `
|
||||
// Struct: (. x:Int y:Int)
|
||||
// Array: 4:Int
|
||||
// [main] = {
|
||||
// ptr:*Byte
|
||||
// stc:Struct
|
||||
// arr:Array
|
||||
// str:String
|
||||
// flt:F64
|
||||
// idx:Index
|
||||
//
|
||||
// ; struct
|
||||
// ptr = [~~*Byte [~~Struct ptr]]
|
||||
// stc = [~~Struct [~~*Byte stc]]
|
||||
// ; array
|
||||
// ptr = [~~*Byte [~~Array ptr]]
|
||||
// arr = [~~Array [~~*Byte arr]]
|
||||
// ; slice
|
||||
// ptr = [~~*Byte [~~String ptr]]
|
||||
// str = [~~String [~~*Byte str]]
|
||||
// ; int
|
||||
// ptr = [~~*Byte [~~Index ptr]]
|
||||
// idx = [~~Index [~~*Byte idx]]
|
||||
// ; float
|
||||
// ptr = [~~*Byte [~~F64 ptr]]
|
||||
// flt = [~~F64 [~~*Byte flt]]
|
||||
//
|
||||
// ; arithmetic
|
||||
// ptr = [~~*Byte [+ 1 [~~Index ptr]]]
|
||||
// }
|
||||
// `)
|
||||
// }
|
||||
|
|
Loading…
Reference in New Issue