Skip to content

Commit

Permalink
~
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz committed Jan 30, 2025
1 parent efd3d11 commit c9c2dfe
Showing 1 changed file with 6 additions and 54 deletions.
60 changes: 6 additions & 54 deletions tests/display/src/cases/Issue5172.hx
Original file line number Diff line number Diff line change
Expand Up @@ -13,79 +13,31 @@ class Issue5172 extends DisplayTestCase {
}
**/
function test() @:privateAccess {
// var res = ctx.callDisplay(ServerMethods.Configure, {
// print: {
// notCached: true,
// parsed: true,
// reusing: true,
// skippingDep: true,
// unchangedContent: true,
// cachedModules: true,
// arguments: true,
// completion: true,
// defines: true,
// signature: true,
// displayPosition: true,
// message: true,
// // socketMessage: true,
// uncaughtError: true,
// newContext: true,
// }
// }).result;
// trace(res);

eq("Int", type(pos(1)));
eq("Int", type(pos(2)));
eq(range(3, 1), position(pos(1)));

var contexts = ctx.callDisplay(ServerMethods.Contexts, null).result;
for (c in contexts) trace(c);

var cp = ctx.callDisplay(ServerMethods.ReadClassPaths, null).result;
trace(cp);
var contexts = ctx.callDisplay(ServerMethods.Contexts, null).result;
for (c in contexts) trace(c);

// var res = ctx.callDisplay(ServerMethods.Module, {
// signature: "81349629668fa99711001f029e1c2390",
// path: "haxe.macro.ExampleJSGenerator"
// }).result;
// trace(res);

var res = ctx.callDisplay(cast "server/typeContexts", {
// signature: "81349629668fa99711001f029e1c2390",
modulePath: "haxe.macro.ExampleJSGenerator",
typeName: "ExampleJSGenerator"
}).result;
trace(res);
// ctx: 81349629668fa99711001f029e1c2390
// macro ctx: 875835219d45ee2ee44539a101e9091f

try {
var res = usage(pos(1));
trace(res);
// print();
arrayEq([range(4, 2)], res);
} catch(e) {
trace(e);
// print();
}

var contexts = ctx.callDisplay(ServerMethods.Contexts, null).result;
for (c in contexts) trace(c);

var res = ctx.callDisplay(cast "server/typeContexts", {
// signature: "81349629668fa99711001f029e1c2390",
modulePath: "haxe.macro.ExampleJSGenerator",
typeName: "ExampleJSGenerator"
}).result;
trace(res);
}

function print() @:privateAccess {
// var p:haxeserver.process.HaxeServerProcessSys = cast @:privateAccess BaseDisplayTestContext.haxeServer.process;
// var p = p.process;
// try {
// p.kill();
// trace(p.stdout.readAll());
// } catch(e) {
// trace(e);
// }
var cp = ctx.callDisplay(ServerMethods.ReadClassPaths, null).result;
trace(cp);
}
}

0 comments on commit c9c2dfe

Please sign in to comment.