import unittest

from testutils import getZserioApi

class FullConstTypeTest(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls.api = getZserioApi(__file__, "expressions.zs").full_const_type

    def testBitSizeOfWithOptional(self):
        fullConstTypeExpression = self.api.FullConstTypeExpression(self.FULL_VALID_VALUE,
                                                                   self.FULL_ADDITIONAL_VALUE)
        self.assertEqual(self.FULL_CONST_TYPE_EXPRESSION_BIT_SIZE_WITH_OPTIONAL,
                         fullConstTypeExpression.bitsizeof())

    def testBitSizeOfWithoutOptional(self):
        fullConstTypeExpression = self.api.FullConstTypeExpression()
        fullConstTypeExpression.value = self.FULL_INVALID_VALUE
        self.assertEqual(self.FULL_CONST_TYPE_EXPRESSION_BIT_SIZE_WITHOUT_OPTIONAL,
                         fullConstTypeExpression.bitsizeof())

    FULL_CONST_TYPE_EXPRESSION_BIT_SIZE_WITH_OPTIONAL = 10
    FULL_CONST_TYPE_EXPRESSION_BIT_SIZE_WITHOUT_OPTIONAL = 7

    FULL_VALID_VALUE = 0x01
    FULL_INVALID_VALUE = 0x00

    FULL_ADDITIONAL_VALUE = 0x03

fba86ebd6c72c57d2db5f884225167bda9a97905
<mask token>


class FullConstTypeTest(unittest.TestCase):

    @classmethod
    def setUpClass(cls):
        cls.api = getZserioApi(__file__, 'expressions.zs').full_const_type
    <mask token>

    def testBitSizeOfWithoutOptional(self):
        fullConstTypeExpression = self.api.FullConstTypeExpression()
        fullConstTypeExpression.value = self.FULL_INVALID_VALUE
        self.assertEqual(self.
            FULL_CONST_TYPE_EXPRESSION_BIT_SIZE_WITHOUT_OPTIONAL,
            fullConstTypeExpression.bitsizeof())
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

<mask token>


class FullConstTypeTest(unittest.TestCase):

    @classmethod
    def setUpClass(cls):
        cls.api = getZserioApi(__file__, 'expressions.zs').full_const_type

    def testBitSizeOfWithOptional(self):
        fullConstTypeExpression = self.api.FullConstTypeExpression(self.
            FULL_VALID_VALUE, self.FULL_ADDITIONAL_VALUE)
        self.assertEqual(self.
            FULL_CONST_TYPE_EXPRESSION_BIT_SIZE_WITH_OPTIONAL,
            fullConstTypeExpression.bitsizeof())

    def testBitSizeOfWithoutOptional(self):
        fullConstTypeExpression = self.api.FullConstTypeExpression()
        fullConstTypeExpression.value = self.FULL_INVALID_VALUE
        self.assertEqual(self.
            FULL_CONST_TYPE_EXPRESSION_BIT_SIZE_WITHOUT_OPTIONAL,
            fullConstTypeExpression.bitsizeof())
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

<mask token>


class FullConstTypeTest(unittest.TestCase):

    @classmethod
    def setUpClass(cls):
        cls.api = getZserioApi(__file__, 'expressions.zs').full_const_type

    def testBitSizeOfWithOptional(self):
        fullConstTypeExpression = self.api.FullConstTypeExpression(self.
            FULL_VALID_VALUE, self.FULL_ADDITIONAL_VALUE)
        self.assertEqual(self.
            FULL_CONST_TYPE_EXPRESSION_BIT_SIZE_WITH_OPTIONAL,
            fullConstTypeExpression.bitsizeof())

    def testBitSizeOfWithoutOptional(self):
        fullConstTypeExpression = self.api.FullConstTypeExpression()
        fullConstTypeExpression.value = self.FULL_INVALID_VALUE
        self.assertEqual(self.
            FULL_CONST_TYPE_EXPRESSION_BIT_SIZE_WITHOUT_OPTIONAL,
            fullConstTypeExpression.bitsizeof())
    FULL_CONST_TYPE_EXPRESSION_BIT_SIZE_WITH_OPTIONAL = 10
    FULL_CONST_TYPE_EXPRESSION_BIT_SIZE_WITHOUT_OPTIONAL = 7
    FULL_VALID_VALUE = 1
    FULL_INVALID_VALUE = 0
    FULL_ADDITIONAL_VALUE = 3

import unittest
from testutils import getZserioApi


class FullConstTypeTest(unittest.TestCase):

    @classmethod
    def setUpClass(cls):
        cls.api = getZserioApi(__file__, 'expressions.zs').full_const_type

    def testBitSizeOfWithOptional(self):
        fullConstTypeExpression = self.api.FullConstTypeExpression(self.
            FULL_VALID_VALUE, self.FULL_ADDITIONAL_VALUE)
        self.assertEqual(self.
            FULL_CONST_TYPE_EXPRESSION_BIT_SIZE_WITH_OPTIONAL,
            fullConstTypeExpression.bitsizeof())

    def testBitSizeOfWithoutOptional(self):
        fullConstTypeExpression = self.api.FullConstTypeExpression()
        fullConstTypeExpression.value = self.FULL_INVALID_VALUE
        self.assertEqual(self.
            FULL_CONST_TYPE_EXPRESSION_BIT_SIZE_WITHOUT_OPTIONAL,
            fullConstTypeExpression.bitsizeof())
    FULL_CONST_TYPE_EXPRESSION_BIT_SIZE_WITH_OPTIONAL = 10
    FULL_CONST_TYPE_EXPRESSION_BIT_SIZE_WITHOUT_OPTIONAL = 7
    FULL_VALID_VALUE = 1
    FULL_INVALID_VALUE = 0
    FULL_ADDITIONAL_VALUE = 3

import unittest

from testutils import getZserioApi

class FullConstTypeTest(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls.api = getZserioApi(__file__, "expressions.zs").full_const_type

    def testBitSizeOfWithOptional(self):
        fullConstTypeExpression = self.api.FullConstTypeExpression(self.FULL_VALID_VALUE,
                                                                   self.FULL_ADDITIONAL_VALUE)
        self.assertEqual(self.FULL_CONST_TYPE_EXPRESSION_BIT_SIZE_WITH_OPTIONAL,
                         fullConstTypeExpression.bitsizeof())

    def testBitSizeOfWithoutOptional(self):
        fullConstTypeExpression = self.api.FullConstTypeExpression()
        fullConstTypeExpression.value = self.FULL_INVALID_VALUE
        self.assertEqual(self.FULL_CONST_TYPE_EXPRESSION_BIT_SIZE_WITHOUT_OPTIONAL,
                         fullConstTypeExpression.bitsizeof())

    FULL_CONST_TYPE_EXPRESSION_BIT_SIZE_WITH_OPTIONAL = 10
    FULL_CONST_TYPE_EXPRESSION_BIT_SIZE_WITHOUT_OPTIONAL = 7

    FULL_VALID_VALUE = 0x01
    FULL_INVALID_VALUE = 0x00

    FULL_ADDITIONAL_VALUE = 0x03
