Support tuples in nim-gdb (#21410)
* Support for printing tuple types * Add test of printing a tuple * Add support for printing tuples in GDB * Forgot to [skip ci]
This commit is contained in:
parent
bdc850916f
commit
e54d3cc418
3 changed files with 28 additions and 5 deletions
|
|
@ -28,7 +28,8 @@ outputs = [
|
|||
'seq(3, 3) = {"one", "two", "three"}',
|
||||
'Table(3, 64) = {[4] = "four", [5] = "five", [6] = "six"}',
|
||||
'Table(3, 8) = {["two"] = 2, ["three"] = 3, ["one"] = 1}',
|
||||
'{a = 1, b = "some string"}'
|
||||
'{a = 1, b = "some string"}',
|
||||
'("hello", 42)'
|
||||
]
|
||||
|
||||
argRegex = re.compile("^.* = (?:No suitable Nim \$ operator found for type: \w+\s*)*(.*)$")
|
||||
|
|
|
|||
|
|
@ -80,7 +80,10 @@ proc testProc(): void =
|
|||
var obj = MyObj(a: 1, b: "some string")
|
||||
myDebug(obj) #15
|
||||
|
||||
assert counter == 15
|
||||
var tup = ("hello", 42)
|
||||
myDebug(tup) # 16
|
||||
|
||||
assert counter == 16
|
||||
|
||||
|
||||
testProc()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue