# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-import bt2.field
import unittest
import bt2
-import collections
from utils import get_default_trace_class
+class BoolFieldClassTestCase(unittest.TestCase):
+ def setUp(self):
+ tc = get_default_trace_class()
+ self._fc = tc.create_bool_field_class()
+
+ def test_create_default(self):
+ self.assertIsNotNone(self._fc)
+
+
class _TestIntegerFieldClassProps:
def test_create_default(self):
fc = self._create_func()
def test_selector_field_path_root_scope(self):
self._fill_default_fc_for_field_path_test()
self.assertEqual(
- self._fc.selector_field_path.root_scope, bt2.Scope.PACKET_CONTEXT
+ self._fc.selector_field_path.root_scope, bt2.FieldPathScope.PACKET_CONTEXT
)
def test_field_path_root_scope(self):
fc = self._create_field_class_for_field_path_test()
- self.assertEqual(fc.length_field_path.root_scope, bt2.Scope.PACKET_CONTEXT)
+ self.assertEqual(
+ fc.length_field_path.root_scope, bt2.FieldPathScope.PACKET_CONTEXT
+ )
def test_create_invalid_field_class(self):
with self.assertRaises(TypeError):