Skip to content

Commit

Permalink
Demo Gen: Add recursion to owning_param labels (#731)
Browse files Browse the repository at this point in the history
* Adding recursion to owning types

* Formatting

* Drafting new demo_gen tests

* Javascript generate

* Fix capitalization

* Formatting

* CPP gen

* C generation

* Dart generation

* Kotlin generation

* Generation adjustments

* Whitespace fixes

* Last whitespace adjustments

* Update CyclicStructA.kt
  • Loading branch information
ambiguousname authored Nov 21, 2024
1 parent ecd0c61 commit ef81347
Show file tree
Hide file tree
Showing 26 changed files with 529 additions and 5 deletions.
2 changes: 2 additions & 0 deletions feature_tests/c/include/CyclicStructA.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions feature_tests/c/include/CyclicStructC.d.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions feature_tests/c/include/CyclicStructC.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions feature_tests/cpp/include/CyclicStructA.d.hpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions feature_tests/cpp/include/CyclicStructA.hpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions feature_tests/cpp/include/CyclicStructC.d.hpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions feature_tests/cpp/include/CyclicStructC.hpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions feature_tests/dart/lib/src/CyclicStructA.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 51 additions & 0 deletions feature_tests/dart/lib/src/CyclicStructC.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions feature_tests/dart/lib/src/lib.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions feature_tests/demo_gen/demo/CyclicStructA.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions feature_tests/demo_gen/demo/CyclicStructA.mjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions feature_tests/demo_gen/demo/CyclicStructC.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions feature_tests/demo_gen/demo/CyclicStructC.mjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions feature_tests/demo_gen/demo/index.mjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions feature_tests/demo_gen/test/test.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import test from "ava";
import { MyStringDemo } from "diplomat-wasm-demo-gen-feature-tests";
import { MyStringDemo, CyclicStructADemo, CyclicStructCDemo, RenderInfo } from "diplomat-wasm-demo-gen-feature-tests";

test("My String", (t) => {
t.is(MyStringDemo.stringTransform("a"), "");
})
})

test("Cyclic Parameters", (t) => {
t.is(RenderInfo.termini["CyclicStructA.cyclicOut"].parameters[0].name, "Self:A:Field");
t.is(RenderInfo.termini["CyclicStructC.cyclicOut"].parameters[0].name, "Self:A:A:Field");
t.is(CyclicStructADemo.cyclicOut(10), "10");
t.is(CyclicStructCDemo.cyclicOut(15), "15");
});
Loading

0 comments on commit ef81347

Please sign in to comment.