Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# v1.8.0-alpha3
# v1.8.0-alpha5

* Added `TI_PROTO_CLIENT_REQ_EMIT_PEER` protocol, pr #414.
* Changed `copy()` behavior for wrapped type, pr #415.
* Fixed missing wrap-prefix flags after renaming type, issue #416.
* Allow defining nested structure in wrap type, pr #417.
* Self-reference within a wrap-only type is no longer required to be nillable, issue #418.
* Fixed missing `hide_id` flag in export, pr #419.
* Include export enumerator members of type `thing`, pr #420.
* Fixed missing "ID" (`#`) field in export, issue #421.

# v1.7.6

Expand Down
2 changes: 1 addition & 1 deletion inc/ti/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* "-rc0"
* ""
*/
#define TI_VERSION_PRE_RELEASE "-alpha4"
#define TI_VERSION_PRE_RELEASE "-alpha5"

#define TI_MAINTAINER \
"Jeroen van der Heijden <jeroen@cesbit.com>"
Expand Down
45 changes: 36 additions & 9 deletions itest/test_advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -1570,7 +1570,11 @@ async def test_assign_in_def(self, client):

async def test_export(self, client):
script = r'''
// Enums
new_type('Friend');
new_type('Person');
new_type('Root');
new_type('W', true, true);
new_type('WW', false, true);

set_enum('B', {
A: base64_decode('YUFh'),
Expand All @@ -1587,19 +1591,16 @@ async def test_export(self, client):
PI: 3.140000,
E: 2.718000,
});
set_enum('Obj', {
A: {},
B: {},
});
set_enum('Str', {
sq: "Hi 'Iris'!",
dq: 'Hi "Cato"!',
bq: 'Hi ''"Tess"''!',
});

// Types

new_type('Friend');
new_type('Person');
new_type('W', true, true);
new_type('WW', false, true);

set_type('Friend', {
person: 'Person',
friend: 'Person',
Expand All @@ -1609,6 +1610,10 @@ async def test_export(self, client):
age: 'int',
upper: |this| this.name..upper(),
});
set_type('Root', {
id: '#',
friends: '?&{Friend}?',
});
set_type('W', {
arr: [{
w: '?W?',
Expand All @@ -1624,14 +1629,36 @@ async def test_export(self, client):
});


// Procedures
mod_enum('Obj', 'mod', 'A', Person{
name: 'Iris',
age: 12,
});
mod_enum('Obj', 'mod', 'B', {
arr: [
1,
2,
],
st: 'my string',
room: room() /* WARN: not exported */,
se: set(
{
x: 42,
},
),
c: |a, b| a + b,
float: 3.140000,
});


new_procedure('more', |a, b| {
.answers.push(a * b);
.answers[-1];
});
new_procedure('multiply', |a, b| a * b);


.to_type('Root');

'DONE';
'''.lstrip().replace(' ', '\t')
await client.query(script)
Expand Down
Loading