Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Gusarich committed Apr 21, 2024
1 parent 5a525e6 commit 09467c0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
3 changes: 2 additions & 1 deletion src/abi/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { getErrorId } from "../types/resolveErrors";
import { AbiFunction } from "./AbiFunction";
import { sha256_sync } from "@ton/crypto";
import path from "path";
import { cwd } from "process";

export const GlobalFunctions: Map<string, AbiFunction> = new Map([
[
Expand Down Expand Up @@ -177,7 +178,7 @@ export const GlobalFunctions: Map<string, AbiFunction> = new Map([
const arg = args[0];

const filePath = ref.file
? path.basename(ref.file!)
? path.relative(cwd(), ref.file!)
: "unknown";
const lineCol = ref.interval.getLineAndColumn();
const debugPrint = `[DEBUG] File ${filePath}:${lineCol.lineNum}:${lineCol.colNum}`;
Expand Down
12 changes: 6 additions & 6 deletions src/test/__snapshots__/bugs.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ exports[`bugs should deploy contract correctly 1`] = `
"$type": "received",
"message": {
"body": {
"cell": "x{178D45190000000000000000502540BE400801A11ED1C2B5BE015F09C1D78C216C33C327FA871621697087357DA2F1247FD7030016E3A425A4E75B646191AC9A34FE5D050BD101A5C490F87D01C66D885D09BC1082_}",
"cell": "x{178D45190000000000000000502540BE400801B2C26FF484DE56C52215B206F6184B8347F58A3D58FAE5FAC0C332F9D82C7ABB0016E3A425A4E75B646191AC9A34FE5D050BD101A5C490F87D01C66D885D09BC1082_}",
"type": "cell",
},
"bounce": false,
"from": "kQDQj2jhWt8Ar4Tg68YQthnhk_1DixC0uEOavtF4kj_rgePE",
"to": "kQAy6pPvtZeeWYEa8XJlMkjfLyt6Z6LvRYyD7t1eVxjZOiny",
"from": "kQDZYTf6Qm8rYpEK2QN7DCXBo_rFHqx9cv1gYZl87BY9XQE-",
"to": "kQDBELbBTylHzXoPFVmVCFjgywjAY01OWKNLmtTPw6p4g3uw",
"type": "internal",
"value": "9.958554",
"value": "9.958442",
},
},
{
Expand All @@ -38,10 +38,10 @@ exports[`bugs should deploy contract correctly 1`] = `
},
},
"bounce": false,
"from": "kQAy6pPvtZeeWYEa8XJlMkjfLyt6Z6LvRYyD7t1eVxjZOiny",
"from": "kQDBELbBTylHzXoPFVmVCFjgywjAY01OWKNLmtTPw6p4g3uw",
"to": "@treasure(treasure)",
"type": "internal",
"value": "9.914260823",
"value": "9.914036823",
},
],
},
Expand Down
17 changes: 9 additions & 8 deletions src/test/feature-debug.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,22 @@ describe("feature-debug", () => {
res.indexOf("=== VM LOGS ===") - 2,
);

expect(debugLogs).toStrictEqual(`[DEBUG] File debug.tact:10:9
expect(debugLogs)
.toStrictEqual(`[DEBUG] File src/test/features/src/test/features/debug.tact:10:9
stack(2 values) : 10000000000 ()
[DEBUG] File debug.tact:11:9
[DEBUG] File src/test/features/debug.tact:11:9
Hello world!
[DEBUG] File debug.tact:12:9
[DEBUG] File src/test/features/debug.tact:12:9
123
[DEBUG] File debug.tact:13:9
[DEBUG] File src/test/features/debug.tact:13:9
true
[DEBUG] File debug.tact:14:9
[DEBUG] File src/test/features/debug.tact:14:9
false
[DEBUG] File debug.tact:15:9
[DEBUG] File src/test/features/debug.tact:15:9
null
[DEBUG] File debug.tact:16:9
[DEBUG] File src/test/features/debug.tact:16:9
${contract.address.toString({ bounceable: true })}
[DEBUG] File debug.tact:17:9
[DEBUG] File src/test/features/debug.tact:17:9
${Address.parseRaw(
"0:83dfd552e63729b472fcbcc8c45ebcc6691702558b68ec7527e1ba403a0f31a8",
)}`);
Expand Down

0 comments on commit 09467c0

Please sign in to comment.