Skip to content

Commit 7115e64

Browse files
committed
update test case
1 parent 4b9d9cc commit 7115e64

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

test/Interop/SwiftToCxx/enums/swift-enum-case-functions.swift

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ public func checkIntDoubleOrBignum(_ x: IntDoubleOrBignum, tag: Int) -> Bool {
207207
// CHECK-NEXT: default: abort();
208208
// CHECK-NEXT: }
209209
// CHECK-NEXT: }
210+
// CHECK: private:
210211
// CHECK: inline int _getEnumTag() const {
211212
// CHECK-NEXT: auto metadata = _impl::$s5Enums12BoolWithCaseOMa(0);
212213
// CHECK-NEXT: auto *vwTableAddr = reinterpret_cast<swift::_impl::ValueWitnessTable **>(metadata._0) - 1;
@@ -218,6 +219,10 @@ public func checkIntDoubleOrBignum(_ x: IntDoubleOrBignum, tag: Int) -> Bool {
218219
// CHECK-NEXT: const auto *enumVWTable = reinterpret_cast<swift::_impl::EnumValueWitnessTable *>(vwTable);
219220
// CHECK-NEXT: return enumVWTable->getEnumTag(_getOpaquePointer(), metadata._0);
220221
// CHECK-NEXT: }
222+
// CHECK: };
223+
// CHECK-NEXT: decltype(BoolWithCase::first) BoolWithCase::first;
224+
// CHECK-NEXT: decltype(BoolWithCase::second) BoolWithCase::second;
225+
// CHECK-NEXT: decltype(BoolWithCase::third) BoolWithCase::third;
221226

222227
// CHECK: class CLikeEnum final {
223228

@@ -277,6 +282,10 @@ public func checkIntDoubleOrBignum(_ x: IntDoubleOrBignum, tag: Int) -> Bool {
277282
// CHECK-NEXT: const auto *enumVWTable = reinterpret_cast<swift::_impl::EnumValueWitnessTable *>(vwTable);
278283
// CHECK-NEXT: return enumVWTable->getEnumTag(_getOpaquePointer(), metadata._0);
279284
// CHECK-NEXT: }
285+
// CHECK: };
286+
// CHECK-NEXT: decltype(CLikeEnum::one) CLikeEnum::one;
287+
// CHECK-NEXT: decltype(CLikeEnum::two) CLikeEnum::two;
288+
// CHECK-NEXT: decltype(CLikeEnum::three) CLikeEnum::three;
280289

281290
// CHECK: class DataCase final {
282291

@@ -319,6 +328,8 @@ public func checkIntDoubleOrBignum(_ x: IntDoubleOrBignum, tag: Int) -> Bool {
319328
// CHECK-NEXT: const auto *enumVWTable = reinterpret_cast<swift::_impl::EnumValueWitnessTable *>(vwTable);
320329
// CHECK-NEXT: return enumVWTable->getEnumTag(_getOpaquePointer(), metadata._0);
321330
// CHECK-NEXT: }
331+
// CHECK: };
332+
// CHECK-NEXT: decltype(DataCase::one) DataCase::one;
322333

323334
// CHECK: class IntDoubleOrBignum final {
324335

@@ -402,6 +413,10 @@ public func checkIntDoubleOrBignum(_ x: IntDoubleOrBignum, tag: Int) -> Bool {
402413
// CHECK-NEXT: const auto *enumVWTable = reinterpret_cast<swift::_impl::EnumValueWitnessTable *>(vwTable);
403414
// CHECK-NEXT: return enumVWTable->getEnumTag(_getOpaquePointer(), metadata._0);
404415
// CHECK-NEXT: }
416+
// CHECK: };
417+
// CHECK-NEXT: decltype(IntDoubleOrBignum::Int) IntDoubleOrBignum::Int;
418+
// CHECK-NEXT: decltype(IntDoubleOrBignum::Double) IntDoubleOrBignum::Double;
419+
// CHECK-NEXT: decltype(IntDoubleOrBignum::Bignum) IntDoubleOrBignum::Bignum;
405420

406421
// CHECK: class IntOrInfinity final {
407422

@@ -470,6 +485,10 @@ public func checkIntDoubleOrBignum(_ x: IntDoubleOrBignum, tag: Int) -> Bool {
470485
// CHECK-NEXT: const auto *enumVWTable = reinterpret_cast<swift::_impl::EnumValueWitnessTable *>(vwTable);
471486
// CHECK-NEXT: return enumVWTable->getEnumTag(_getOpaquePointer(), metadata._0);
472487
// CHECK-NEXT: }
488+
// CHECK: };
489+
// CHECK-NEXT: decltype(IntOrInfinity::NegInfinity) IntOrInfinity::NegInfinity;
490+
// CHECK-NEXT: decltype(IntOrInfinity::Int) IntOrInfinity::Int;
491+
// CHECK-NEXT: decltype(IntOrInfinity::PosInfinity) IntOrInfinity::PosInfinity;
473492

474493
// CHECK: class MultipleBoolWithCase final {
475494

@@ -560,3 +579,8 @@ public func checkIntDoubleOrBignum(_ x: IntDoubleOrBignum, tag: Int) -> Bool {
560579
// CHECK-NEXT: const auto *enumVWTable = reinterpret_cast<swift::_impl::EnumValueWitnessTable *>(vwTable);
561580
// CHECK-NEXT: return enumVWTable->getEnumTag(_getOpaquePointer(), metadata._0);
562581
// CHECK-NEXT: }
582+
// CHECK: };
583+
// CHECK-NEXT: decltype(MultipleBoolWithCase::first) MultipleBoolWithCase::first;
584+
// CHECK-NEXT: decltype(MultipleBoolWithCase::second) MultipleBoolWithCase::second;
585+
// CHECK-NEXT: decltype(MultipleBoolWithCase::third) MultipleBoolWithCase::third;
586+
// CHECK-NEXT: decltype(MultipleBoolWithCase::fourth) MultipleBoolWithCase::fourth;

0 commit comments

Comments
 (0)