Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
core.demangle: add test cases for back references
Browse files Browse the repository at this point in the history
  • Loading branch information
rainers committed May 28, 2017
1 parent 496e5df commit 78d946f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/core/demangle.d
Original file line number Diff line number Diff line change
Expand Up @@ -2074,8 +2074,21 @@ version(unittest)
["_D5bug145Class3barMFNjZPv", "return void* bug14.Class.bar()"],
["_D5bug143fooFMPvZPv", "void* bug14.foo(scope void*)"],
["_D5bug143barFMNkPvZPv", "void* bug14.bar(scope return void*)"],

// back references
["_D4core4stdc5errnoQGFZi", "int core.stdc.errno.errno()"], // identifier back reference
["_D4testFS10structnameQ1dZb", "bool test(structname, structname)"], // type back reference
["_D4testFS3pkg10structname5innerSQL2DZb", "bool test(pkg.structname.inner, pkg.structname)"], // symbol back reference
// 1.s.s.foo from https://issues.dlang.org/show_bug.cgi?id=15831
["_D13testexpansion44__T1sTS13testexpansion8__T1sTiZ1sFiZ6ResultZ1sFS13testexpansion8__T1sTiZ1sFiZ6ResultZ6Result3fooMFNaNfZv",
"pure @safe void testexpansion.s!(testexpansion.s!(int).s(int).Result).s(testexpansion.s!(int).s(int).Result).Result.foo()"],
["_D13testexpansion__T1sTSQ2C__TQ1ATiZQ1GFiZ6ResultZQ3AFQ3bZQ1G3fooMFNaNfZv",
"pure @safe void testexpansion.s!(testexpansion.s!(int).s(int).Result).s(testexpansion.s!(int).s(int).Result).Result.foo()"],
["_D2rt4util9container5treap__T5TreapTS2gc11gcinterface4RootZQ3A6insertMFNbNiPSQP7F4NodeQ5aZQ1f",
"nothrow @nogc rt.util.container.treap.Treap!(gc.gcinterface.Root).Treap.Node* rt.util.container.treap.Treap!(gc.gcinterface.Root).Treap.insert(rt.util.container.treap.Treap!(gc.gcinterface.Root).Treap.Node*, gc.gcinterface.Root)" ],
];


template staticIota(int x)
{
template Seq(T...){ alias T Seq; }
Expand Down

0 comments on commit 78d946f

Please sign in to comment.