bt2: add boolean field class and field support
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 12 Aug 2019 02:04:08 +0000 (22:04 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 4 Sep 2019 15:58:21 +0000 (11:58 -0400)
commita07f15cb06a96ad0f76c2d97979fc6bd9fa81894
tree571c1c7e6ea2d164f75299ff4eed9664696d0b3c
parentdc9cc972b8dc1b63f637f1dcf78a662be29f5c11
bt2: add boolean field class and field support

This patch adds boolean field class and field support to the Python
bindings.

A boolean field class has no properties.

A boolean field is a numeric field (like Python's `bool` is a numeric
type). The `BoolFieldTestCase` test case inherits `_TestNumericField`,
making sure the field behaves more or less like the Python `bool` type.
`BoolFieldTestCase` is very similar to `BoolValueTestCase`.

Just like `BoolValue` objects, you can set the value of a `BoolField`
object from a `bool` or `BoolField` object.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Ib6d0723d69709b7f3b459ba173eb7cbea5d8c435
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1896
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
src/bindings/python/bt2/bt2/__init__.py
src/bindings/python/bt2/bt2/field.py
src/bindings/python/bt2/bt2/field_class.py
src/bindings/python/bt2/bt2/trace_class.py
tests/bindings/python/bt2/test_field.py
tests/bindings/python/bt2/test_field_class.py
tests/bindings/python/bt2/test_package.py
This page took 0.026711 seconds and 4 git commands to generate.