aboutsummaryrefslogtreecommitdiff
path: root/tools/interface_generator/bin/interface_declaration_unittest.py
blob: b2ad80c9d0b3c98dfaafb8af0dca6bf872320fd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""
interface declaration unit tests
"""

import unittest
from interface_declaration import InterfaceDeclaration


class InterfaceDeclarationUnittest(unittest.TestCase):
    """interface_declaration unit tests"""

    def test_interfacedeclaration_class_asdict(self):
        """test mock interface"""
        interface = InterfaceDeclaration("kstdio", None)
        interface_dict = interface.into_dict()

        self.assertEqual(interface.name, "kstdio")
        self.assertEqual(len(interface.license_hdr), 0)
        self.assertEqual(interface_dict["name"], "kstdio")