From e22fa64d65c1d3227af8216d161e20fba249de3e Mon Sep 17 00:00:00 2001 From: Benedikt Strehle Date: Sat, 12 Oct 2024 20:16:13 +0200 Subject: [PATCH] update uix tests --- uix-tests/common/datex-tests.tsx | 105 ++++++++++++++++--------------- uix-tests/deno.lock | 11 ++-- 2 files changed, 60 insertions(+), 56 deletions(-) diff --git a/uix-tests/common/datex-tests.tsx b/uix-tests/common/datex-tests.tsx index cc3c870..e1d51be 100644 --- a/uix-tests/common/datex-tests.tsx +++ b/uix-tests/common/datex-tests.tsx @@ -8,59 +8,60 @@ import { inferType, StorageSet } from 'datex-core-legacy/datex_all.ts'; const C = 0; -@sync class A { - @property a!: number; - construct() { - this.a = 42; - } -} -@sync class B extends A { - @property b!: number; - construct() { - super.construct(); - this.b = 69; - } -} -const list = eternalVar("tmp1-"+C) ?? $$(new StorageSet()); -if (await list.getSize() === 0) { - await list.add(new A()); - await list.add(new B()); -} -for await (const entry of list) { - console.log(entry,entry.a, entry.b) -} -console.log("") +// @sync class A { +// @property a!: number; +// construct() { +// this.a = 42; +// } +// } +// @sync class B extends A { +// @property b!: number; +// construct() { +// super.construct(); +// this.b = 69; +// } +// } +// const list = eternalVar("tmp1-"+C) ?? $$(new StorageSet()); +// if (await list.getSize() === 0) { +// await list.add(new A()); +// await list.add(new B()); +// } +// for await (const entry of list) { +// console.log(entry,entry.a, entry.b) +// } +// console.log("") -// { // Structs -// const A = struct('A', -// class { -// @property a!: number; -// construct() { -// console.log("contrucst A") -// this.a = 42; -// } -// } -// ) -// type A = inferType; + +{ // Structs + const A = struct( + class A { + @property a!: number; + construct() { + console.log("contrucst A") + this.a = 42; + } + } + ) + type A = inferType; -// const B = struct('B', -// class extends A { -// @property b!: number; -// construct() { -// super.construct(); -// this.b = 69; -// } -// } -// ) -// type B = inferType; -// const list = eternalVar("tmp2-"+C) ?? $$(new StorageSet()); -// if (await list.getSize() === 0) { -// await list.add(new A()); -// await list.add(new B()); -// } -// for await (const entry of list) { -// console.log(entry, entry.a, entry.b) -// } -// } \ No newline at end of file + const B = struct( + class Bee extends A { + @property b!: number; + construct() { + super.construct(); + this.b = 69; + } + } + ) + type B = inferType; + const list = eternalVar("tmp2-"+C) ?? $$(new StorageSet()); + if (await list.getSize() === 0) { + await list.add(new A()); + await list.add(new B()); + } + for await (const entry of list) { + console.log(entry, entry.a, entry.b) + } +} \ No newline at end of file diff --git a/uix-tests/deno.lock b/uix-tests/deno.lock index 1e4b089..af01a92 100644 --- a/uix-tests/deno.lock +++ b/uix-tests/deno.lock @@ -2,7 +2,7 @@ "version": "4", "specifiers": { "npm:@swc/core@1.7.23": "1.7.23", - "npm:source-map@*": "0.6.1", + "npm:source-map@*": "0.7.4", "npm:terser@*": "5.34.1" }, "npm": { @@ -106,12 +106,15 @@ "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dependencies": [ "buffer-from", - "source-map" + "source-map@0.6.1" ] }, "source-map@0.6.1": { "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, + "source-map@0.7.4": { + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==" + }, "terser@5.34.1": { "integrity": "sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA==", "dependencies": [ @@ -428,7 +431,7 @@ "https://dev.cdn.unyt.org/uix1/src/routing/rendering.ts": "814aa1165bcc127920e88871f2b8d6b9a3fcd398ab894cbe6f61c696a59219e9", "https://dev.cdn.unyt.org/uix1/src/routing/route-filter.ts": "d9f1d5b3a658c6936279ec4e2e88d658bc53524a89d95c5f4b6c234d88142eb4", "https://dev.cdn.unyt.org/uix1/src/server/server.ts": "145e709aa534a05186086d23c5b87ec4964b173f0a0ee3d38fa5b99af3adee26", - "https://dev.cdn.unyt.org/uix1/src/server/transpiler.ts": "6cefcea8176753aec5f7834db63d44b4fb132f84d75f2bb7bb2d26f627ed92db", + "https://dev.cdn.unyt.org/uix1/src/server/transpiler.ts": "13685019582a8660f836f16ee49be01b13a89ecf6a7912b8dc9d73be4b78d94c", "https://dev.cdn.unyt.org/uix1/src/server/ts-import-resolver.ts": "e7557240c5c26469611fcef47442d9f06146a8bd52d1857145212e5ff526f2b3", "https://dev.cdn.unyt.org/uix1/src/session/backend.ts": "731ab75fbdd9ff7d092db45ea8984af9b1130baa56fdcd14607a0006b083437b", "https://dev.cdn.unyt.org/uix1/src/session/cookies.ts": "152bc834a8cbb4c069afb05f1c5891513954e9341dbb92a522c3d98351eb1a60", @@ -585,7 +588,7 @@ "https://dev.cdn.unyt.org/unyt_core/storage/storage-locations/sql-definitions.ts": "e89c364c19f117eabf163a610c02999e576785c4262c72dff142d5e99276fc6f", "https://dev.cdn.unyt.org/unyt_core/storage/storage-locations/sql-type-map.ts": "014e7f142dfc51eb7c2a9ae102547961e7a9df1302cc052c1fadc11239bdbbce", "https://dev.cdn.unyt.org/unyt_core/storage/storage-locations/sqlite-db.ts": "dd482aaff2c6f92a3fe6d32d06412adb16a406fa6cc16f4f5c5bec65195df734", - "https://dev.cdn.unyt.org/unyt_core/storage/storage.ts": "3a1a4a198e9753327636e7d5cc1f880b81e228fb0f7d209607eaae5655af06be", + "https://dev.cdn.unyt.org/unyt_core/storage/storage.ts": "450edc2a94900dd28c6d6f4e56846758ba40d63f2c5dfa405d1a9ec33582b703", "https://dev.cdn.unyt.org/unyt_core/types/addressing.ts": "62c8a48b84237409780faf7601daf9abbf581036005218f3b9b60cc66e89cbf4", "https://dev.cdn.unyt.org/unyt_core/types/assertion.ts": "ffa9614cf4ad904df1007d0a6441788eceb3347d26791771372c17b9249ea2ce", "https://dev.cdn.unyt.org/unyt_core/types/deferred.ts": "eb308e59468c7ca5bd3179e4aa86b5c73d7c4de60d1d656a6c244e3414e61e0d",