|
1 |
| -# TestSwiftTaggedPointer.py |
2 |
| -# |
3 |
| -# This source file is part of the Swift.org open source project |
4 |
| -# |
5 |
| -# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors |
6 |
| -# Licensed under Apache License v2.0 with Runtime Library Exception |
7 |
| -# |
8 |
| -# See https://swift.org/LICENSE.txt for license information |
9 |
| -# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors |
10 |
| -# |
11 |
| -# ------------------------------------------------------------------------------ |
12 |
| -import lldbsuite.test.lldbinline as lldbinline |
| 1 | +import lldb |
13 | 2 | from lldbsuite.test.decorators import *
|
| 3 | +import lldbsuite.test.lldbtest as lldbtest |
| 4 | +import lldbsuite.test.lldbutil as lldbutil |
| 5 | +import unittest2 |
14 | 6 |
|
15 |
| -# This test depends on NSObject, so it is not available on non-Darwin |
16 |
| -# platforms. |
17 |
| -lldbinline.MakeInlineTest(__file__, globals(), |
18 |
| - decorators=[swiftTest,skipUnlessDarwin, |
19 |
| - skipIf(bugnumber="rdar://problem/66842937")]) |
| 7 | + |
| 8 | +class TestSwiftAnyType(lldbtest.TestBase): |
| 9 | + |
| 10 | + mydir = lldbtest.TestBase.compute_mydir(__file__) |
| 11 | + |
| 12 | + @swiftTest |
| 13 | + # This test depends on NSObject, so it is not available on non-Darwin |
| 14 | + # platforms. |
| 15 | + @skipUnlessDarwin |
| 16 | + def test(self): |
| 17 | + self.build() |
| 18 | + target, process, thread, bkpt = lldbutil.run_to_source_breakpoint( |
| 19 | + self, 'break here', lldb.SBFileSpec('main.swift')) |
| 20 | + |
| 21 | + self.expect('frame variable -d run -- a', substrs=['Int64(3)']) |
| 22 | + self.expect('frame variable -d run -- b', substrs=['Int64(3)']) |
| 23 | + |
| 24 | + self.expect('frame variable -d run -- c', substrs=['"hi"']) |
| 25 | + self.expect('frame variable -d run -- d', substrs=['"hi"']) |
| 26 | + |
| 27 | + self.expect('expr -d run -- a', substrs=['Int64(3)']) |
| 28 | + self.expect('expr -d run -- b', substrs=['Int64(3)']) |
| 29 | + |
| 30 | + self.expect('expr -d run -- c', substrs=['"hi"']) |
| 31 | + self.expect('expr -d run -- d', substrs=['"hi"']) |
0 commit comments