Skip to content

Commit

Permalink
Upd ver
Browse files Browse the repository at this point in the history
  • Loading branch information
joente committed Dec 21, 2024
1 parent 53c897e commit 1cfef40
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

* Use smaller fragments when writing WebSocket data, pr #400 (@ivomans).
* Pin gcloud image as gsutil is not working in latest _(gcloud build only)_.
* Add default boolean syntax to allow a default `true` value, pr #401.
* Add default boolean syntax to allow a default `true` value, pr #402.

# v1.7.0

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 "-alpha2"
#define TI_VERSION_PRE_RELEASE "-rc0"

#define TI_MAINTAINER \
"Jeroen van der Heijden <jeroen@cesbit.com>"
Expand Down
19 changes: 16 additions & 3 deletions itest/test_advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -2642,18 +2642,31 @@ async def test_names_loading(self, client):
self.assertEqual(res[1], 'my_test_key2')

async def test_def_bool(self, client):
# See #pr401
# New syntax for boolean with default, see (pr #402)
q = client.query
t = await q("""//ti
set_type('T', {
t: 'bool<true>',
f: 'bool<false>'
f: 'bool<false>',
o: 'bool?',
to: 'bool<true>?',
fo: 'bool<false>?',
});
test = T{
t: false,
f: false,
o: nil,
to: nil,
fo: nil,
};
T{};
""")
self.assertEqual(t, {
't': True,
'f': False
'f': False,
'o': None,
'to': True,
'fo': False,
})
with self.assertRaisesRegex(
ValueError,
Expand Down

0 comments on commit 1cfef40

Please sign in to comment.