|
1 |
| -// RUN: %target-run-simple-swift |
| 1 | +// RUN: %empty-directory(%t) |
| 2 | +// RUN: %target-build-swift -parse-stdlib %s -module-name main -o %t/a.out |
| 3 | +// RUN: %target-run %t/a.out |
2 | 4 | // REQUIRES: executable_test
|
3 | 5 |
|
| 6 | +import Swift |
4 | 7 | import StdlibUnittest
|
5 | 8 |
|
6 | 9 | let DemangleToMetadataTests = TestSuite("DemangleToMetadata")
|
@@ -213,5 +216,19 @@ DemangleToMetadataTests.test("nested generic specializations") {
|
213 | 216 | _typeByMangledName("4main3CG2C5InnerC9InnermostVySiSS_Sd_s4Int8Vs5Int16Vs5Int32Vs5Int64VG")!)
|
214 | 217 | }
|
215 | 218 |
|
| 219 | +DemangleToMetadataTests.test("demangle built-in types") { |
| 220 | + expectEqual(Builtin.Int8.self, _typeByMangledName("Bi8_")!) |
| 221 | + expectEqual(Builtin.Int16.self, _typeByMangledName("Bi16_")!) |
| 222 | + expectEqual(Builtin.Int32.self, _typeByMangledName("Bi32_")!) |
| 223 | + expectEqual(Builtin.Int64.self, _typeByMangledName("Bi64_")!) |
| 224 | + expectEqual(Builtin.Int128.self, _typeByMangledName("Bi128_")!) |
| 225 | + expectEqual(Builtin.Int256.self, _typeByMangledName("Bi256_")!) |
| 226 | + expectEqual(Builtin.Int512.self, _typeByMangledName("Bi512_")!) |
| 227 | + |
| 228 | + expectEqual(Builtin.NativeObject.self, _typeByMangledName("Bo")!) |
| 229 | + expectEqual(Builtin.BridgeObject.self, _typeByMangledName("Bb")!) |
| 230 | + expectEqual(Builtin.UnsafeValueBuffer.self, _typeByMangledName("BB")!) |
| 231 | +} |
| 232 | + |
216 | 233 | runAllTests()
|
217 | 234 |
|
0 commit comments