[Lldb-commits] [lldb] r273718 - Added a test case for bitfield ivars. It currently fails.

Sean Callanan via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 24 13:41:19 PDT 2016


Author: spyffe
Date: Fri Jun 24 15:41:18 2016
New Revision: 273718

URL: http://llvm.org/viewvc/llvm-project?rev=273718&view=rev
Log:
Added a test case for bitfield ivars.  It currently fails.

<rdar://problem/17990991>

Added:
    lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/
    lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py
    lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/main.m

Added: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py?rev=273718&view=auto
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py (added)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py Fri Jun 24 15:41:18 2016
@@ -0,0 +1,4 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+
+lldbinline.MakeInlineTest(__file__, globals(), [decorators.skipIfFreeBSD,decorators.skipIfLinux,decorators.skipIfWindows, decorators.expectedFailureAll(bugnumber="rdar://problem/17990991")])

Added: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/main.m
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/main.m?rev=273718&view=auto
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/main.m (added)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/main.m Fri Jun 24 15:41:18 2016
@@ -0,0 +1,52 @@
+//===-- main.m -------------------------------------------*- Objective-C-*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#import <Foundation/Foundation.h>
+
+ at interface HasBitfield : NSObject {
+ at public
+    unsigned field1 : 1;
+    unsigned field2 : 1;
+};
+
+-(id)init;
+ at end
+
+ at implementation HasBitfield
+-(id)init {
+    self = [super init];
+    field1 = 0;
+    field2 = 1;
+    return self;
+}
+ at end
+
+ at interface ContainsAHasBitfield : NSObject {
+ at public
+    HasBitfield *hb;
+};
+-(id)init;
+ at end
+
+ at implementation  ContainsAHasBitfield
+-(id)init {
+    self = [super init];
+    hb = [[HasBitfield alloc] init];
+    return self;
+}
+
+ at end
+
+int main(int argc, const char * argv[]) {
+    ContainsAHasBitfield *chb = [[ContainsAHasBitfield alloc] init];
+    printf("%d\n", chb->hb->field2); //% self.expect("expression -- chb->hb->field1", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["= 0"])
+                                     //% self.expect("expression -- chb->hb->field2", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["= 1"]) # this must happen second
+    return 0;
+}
+




More information about the lldb-commits mailing list