bt2: add boolean field class and field support
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 12 Aug 2019 02:04:08 +0000 (22:04 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 15 Aug 2019 15:41:44 +0000 (11:41 -0400)
commitaae30e61f85f6654c37da7a5da3b22fbbe2dbd5c
tree2c87d0693d6d6cad19b07613de6bb76de4b1be63
parentecd27ae41916847cf21d8831820210f28d7fa108
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.025176 seconds and 4 git commands to generate.