# Path: haystack/types.py
# __PROXIES = {}
#         SIZE = self.__longdoublesize
#         HOSTSIZE = self.sizeof(self.__real_ctypes.c_longdouble)
#         HOSTDOUBLESIZE = self.sizeof(self.__real_ctypes.c_double)
#         POINTERSIZE = self.__pointersize
# def load_ctypes_default():
# def build_ctypes_proxy(longsize, pointersize, longdoublesize):
# def is_ctypes_instance(obj):
# def check_arg_is_type(func):
#     def check_arg(self, objtype):
#     def __init__(self, longsize, pointersize, longdoublesize):
#     def __init_types(self):
#     def __set_void(self):
#     def __set_int128(self):
#     def __set_long(self):
#     def __set_float(self):
#                 def __eq__(thisself, other):
#                 def __repr__(thisself):
#                 def value(thisself):
#                 def __eq__(thisself, other):
#                 def __repr__(thisself):
#                 def value(thisself):
#     def __set_pointer(self):
#             def _sub_addr_(myself):
#             def __init__(myself, value):
#             def __repr__(myself):
#         def POINTER_T(pointee):
#                 def __repr__(myself):
#                 def contents(myself):
#                 def __init__(myself, _value=None):
#     def __set_records(self):
#             def read_string(self, memoryMap, address, max_size, chunk_length=256):
#             def read_string(self, memoryMap, address, max_size, chunk_length=256):
#     def __set_utils_types(self):
#     def __cast(self, obj, next_type):
#     def __set_CFUNCTYPE(self):
#             def __init__(myself, *a, **args):
#         def fn_FUNC_T(*args):
#     def _p_type(self):
#     def get_real_ctypes_member(self, typename):
#     def get_pack_format(self):
#     def get_bytes_for_record_field(self, record, fieldname):
#     def is_array_of_basic_instance(self, obj):
#     def is_array_type(self, objtype):
#     def is_array_of_basic_type(self, objtype):
#     def is_basic_type(self, objtype):
#     def is_basic_ctype(self, objtype):
#     def is_cstring_type(self, objtype):
#     def is_function_type(self, objtype):
#     def is_pointer_type(self, objtype):
#     def get_pointee_type(self, objtype):
#     def is_pointer_to_array_type(self, objtype):
#     def is_pointer_to_basic_type(self, objtype):
#     def is_pointer_to_struct_type(self, objtype):
#     def is_pointer_to_union_type(self, objtype):
#     def is_pointer_to_void_type(self, objtype):
#     def is_struct_type(self, objtype):
#     def is_union_type(self, objtype):
#     def __str__(self):
# class CTypesProxy(object):
#         class c_longdouble(self.__real_ctypes.Union):
#         class _T_Simple(_ctypes._SimpleCData,):
#             class _T(_T_Simple,):
#         class CString(self.__real_ctypes.Union):
#         class CWString(self.__real_ctypes.Union):
#         class _FUNC_T(self._T_Simple,):


import logging
import unittest
        import ctypes
from haystack import types
        from haystack import basicmodel
        from haystack import basicmodel
        from haystack import basicmodel
        from haystack import basicmodel
                      arra6, Union, ptrUnion]

    def test_sizes(self):
        self.assertEqual(self._ctypes.sizeof(self._ctypes.c_long), 4)
        self.assertEqual(self._ctypes.sizeof(self._ctypes.c_void_p), 4)
        self.assertEqual(self._ctypes.sizeof(self._ctypes.POINTER(self._ctypes.c_int)), 4)
        self.assertEqual(self._ctypes.sizeof(self._ctypes.c_char_p), 4)
        self.assertEqual(self._ctypes.sizeof(self._ctypes.c_wchar_p), 4)
        self.assertEqual(self._ctypes.sizeof(arra1), 4 * 4)
        self.assertEqual(self._ctypes.sizeof(double), 8)
        self.assertEqual(self._ctypes.sizeof(fptr), 4)

        return

    def test_import(self):
        self.assertFalse(
            issubclass(
                self._ctypes.Structure,
                basicmodel.CTypesRecordConstraintValidator))
        self.assertFalse(issubclass(self._ctypes.Union, basicmodel.CTypesRecordConstraintValidator))
        self.assertIn(self._ctypes.CString, self._ctypes.__dict__.values())


class TestBasicFunctionsWin(TestBasicFunctions):

    """Tests basic haystack.utils functions on base types for x64 arch."""

    def setUp(self):
        """Have to reload that at every test. classmethod will not work"""
        # use the host self._ctypes with modif

# Path: haystack/types.py
# __PROXIES = {}
#         SIZE = self.__longdoublesize
#         HOSTSIZE = self.sizeof(self.__real_ctypes.c_longdouble)
#         HOSTDOUBLESIZE = self.sizeof(self.__real_ctypes.c_double)
#         POINTERSIZE = self.__pointersize
# def load_ctypes_default():
# def build_ctypes_proxy(longsize, pointersize, longdoublesize):
# def is_ctypes_instance(obj):
# def check_arg_is_type(func):
#     def check_arg(self, objtype):
#     def __init__(self, longsize, pointersize, longdoublesize):
#     def __init_types(self):
#     def __set_void(self):
#     def __set_int128(self):
#     def __set_long(self):
#     def __set_float(self):
#                 def __eq__(thisself, other):
#                 def __repr__(thisself):
#                 def value(thisself):
#                 def __eq__(thisself, other):
#                 def __repr__(thisself):
#                 def value(thisself):
#     def __set_pointer(self):
#             def _sub_addr_(myself):
#             def __init__(myself, value):
#             def __repr__(myself):
#         def POINTER_T(pointee):
#                 def __repr__(myself):
#                 def contents(myself):
#                 def __init__(myself, _value=None):
#     def __set_records(self):
#             def read_string(self, memoryMap, address, max_size, chunk_length=256):
#             def read_string(self, memoryMap, address, max_size, chunk_length=256):
#     def __set_utils_types(self):
#     def __cast(self, obj, next_type):
#     def __set_CFUNCTYPE(self):
#             def __init__(myself, *a, **args):
#         def fn_FUNC_T(*args):
#     def _p_type(self):
#     def get_real_ctypes_member(self, typename):
#     def get_pack_format(self):
#     def get_bytes_for_record_field(self, record, fieldname):
#     def is_array_of_basic_instance(self, obj):
#     def is_array_type(self, objtype):
#     def is_array_of_basic_type(self, objtype):
#     def is_basic_type(self, objtype):
#     def is_basic_ctype(self, objtype):
#     def is_cstring_type(self, objtype):
#     def is_function_type(self, objtype):
#     def is_pointer_type(self, objtype):
#     def get_pointee_type(self, objtype):
#     def is_pointer_to_array_type(self, objtype):
#     def is_pointer_to_basic_type(self, objtype):
#     def is_pointer_to_struct_type(self, objtype):
#     def is_pointer_to_union_type(self, objtype):
#     def is_pointer_to_void_type(self, objtype):
#     def is_struct_type(self, objtype):
#     def is_union_type(self, objtype):
#     def __str__(self):
# class CTypesProxy(object):
#         class c_longdouble(self.__real_ctypes.Union):
#         class _T_Simple(_ctypes._SimpleCData,):
#             class _T(_T_Simple,):
#         class CString(self.__real_ctypes.Union):
#         class CWString(self.__real_ctypes.Union):
#         class _FUNC_T(self._T_Simple,):


# Path: test/haystack/test_types.py
import logging
import unittest
        import ctypes
from haystack import types
        from haystack import basicmodel
        from haystack import basicmodel
        from haystack import basicmodel
        from haystack import basicmodel

                      arra6, Union, ptrUnion]

    def test_sizes(self):
        self.assertEqual(self._ctypes.sizeof(self._ctypes.c_long), 4)
        self.assertEqual(self._ctypes.sizeof(self._ctypes.c_void_p), 4)
        self.assertEqual(self._ctypes.sizeof(self._ctypes.POINTER(self._ctypes.c_int)), 4)
        self.assertEqual(self._ctypes.sizeof(self._ctypes.c_char_p), 4)
        self.assertEqual(self._ctypes.sizeof(self._ctypes.c_wchar_p), 4)
        self.assertEqual(self._ctypes.sizeof(arra1), 4 * 4)
        self.assertEqual(self._ctypes.sizeof(double), 8)
        self.assertEqual(self._ctypes.sizeof(fptr), 4)

        return

    def test_import(self):
        self.assertFalse(
            issubclass(
                self._ctypes.Structure,
                basicmodel.CTypesRecordConstraintValidator))
        self.assertFalse(issubclass(self._ctypes.Union, basicmodel.CTypesRecordConstraintValidator))
        self.assertIn(self._ctypes.CString, self._ctypes.__dict__.values())


class TestBasicFunctionsWin(TestBasicFunctions):

    """Tests basic haystack.utils functions on base types for x64 arch."""

    def setUp(self):
        """Have to reload that at every test. classmethod will not work"""
        # use the host self._ctypes with modif

        ctypes = types.build_ctypes_proxy(8, 8, 8)