Skip to content

Commit

Permalink
haaaaands
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz committed Jan 30, 2025
1 parent 086e1ec commit b696d93
Showing 1 changed file with 50 additions and 30 deletions.
80 changes: 50 additions & 30 deletions tests/display/src/cases/Issue5172.hx
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,26 @@ 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);
// 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)));
Expand All @@ -44,25 +44,45 @@ class Issue5172 extends DisplayTestCase {
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);

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

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 p:haxeserver.process.HaxeServerProcessSys = cast @:privateAccess BaseDisplayTestContext.haxeServer.process;
// var p = p.process;
// try {
// p.kill();
// trace(p.stdout.readAll());
// } catch(e) {
// trace(e);
// }
}
}

0 comments on commit b696d93

Please sign in to comment.