| 1 | # |
| 2 | # Copyright (C) 2019 EfficiOS Inc. |
| 3 | # |
| 4 | # This program is free software; you can redistribute it and/or |
| 5 | # modify it under the terms of the GNU General Public License |
| 6 | # as published by the Free Software Foundation; only version 2 |
| 7 | # of the License. |
| 8 | # |
| 9 | # This program is distributed in the hope that it will be useful, |
| 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | # GNU General Public License for more details. |
| 13 | # |
| 14 | # You should have received a copy of the GNU General Public License |
| 15 | # along with this program; if not, write to the Free Software |
| 16 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 17 | # |
| 18 | |
| 19 | import bt2 |
| 20 | import unittest |
| 21 | |
| 22 | |
| 23 | class PackageTestCase(unittest.TestCase): |
| 24 | def _assert_in_bt2(self, name): |
| 25 | self.assertIn(name, dir(bt2)) |
| 26 | |
| 27 | def test_has_ClockClassOffset(self): |
| 28 | self._assert_in_bt2('ClockClassOffset') |
| 29 | |
| 30 | def test_has__ClockSnapshot(self): |
| 31 | self._assert_in_bt2('_ClockSnapshot') |
| 32 | |
| 33 | def test_has__UnknownClockSnapshot(self): |
| 34 | self._assert_in_bt2('_UnknownClockSnapshot') |
| 35 | |
| 36 | def test_has__SourceComponentClass(self): |
| 37 | self._assert_in_bt2('_SourceComponentClass') |
| 38 | |
| 39 | def test_has__FilterComponentClass(self): |
| 40 | self._assert_in_bt2('_FilterComponentClass') |
| 41 | |
| 42 | def test_has__SinkComponentClass(self): |
| 43 | self._assert_in_bt2('_SinkComponentClass') |
| 44 | |
| 45 | def test_has__SourceComponent(self): |
| 46 | self._assert_in_bt2('_SourceComponent') |
| 47 | |
| 48 | def test_has__FilterComponent(self): |
| 49 | self._assert_in_bt2('_FilterComponent') |
| 50 | |
| 51 | def test_has__SinkComponent(self): |
| 52 | self._assert_in_bt2('_SinkComponent') |
| 53 | |
| 54 | def test_has__UserSourceComponent(self): |
| 55 | self._assert_in_bt2('_UserSourceComponent') |
| 56 | |
| 57 | def test_has__UserFilterComponent(self): |
| 58 | self._assert_in_bt2('_UserFilterComponent') |
| 59 | |
| 60 | def test_has__UserSinkComponent(self): |
| 61 | self._assert_in_bt2('_UserSinkComponent') |
| 62 | |
| 63 | def test_has_ComponentClassType(self): |
| 64 | self._assert_in_bt2('ComponentClassType') |
| 65 | |
| 66 | def test_has__ErrorCause(self): |
| 67 | self._assert_in_bt2('_ErrorCause') |
| 68 | |
| 69 | def test_has__ComponentErrorCause(self): |
| 70 | self._assert_in_bt2('_ComponentErrorCause') |
| 71 | |
| 72 | def test_has__ComponentClassErrorCause(self): |
| 73 | self._assert_in_bt2('_ComponentClassErrorCause') |
| 74 | |
| 75 | def test_has__MessageIteratorErrorCause(self): |
| 76 | self._assert_in_bt2('_MessageIteratorErrorCause') |
| 77 | |
| 78 | def test_has__Error(self): |
| 79 | self._assert_in_bt2('_Error') |
| 80 | |
| 81 | def test_has_EventClassLogLevel(self): |
| 82 | self._assert_in_bt2('EventClassLogLevel') |
| 83 | |
| 84 | def test_has__IntegerField(self): |
| 85 | self._assert_in_bt2('_IntegerField') |
| 86 | |
| 87 | def test_has__UnsignedIntegerField(self): |
| 88 | self._assert_in_bt2('_UnsignedIntegerField') |
| 89 | |
| 90 | def test_has__SignedIntegerField(self): |
| 91 | self._assert_in_bt2('_SignedIntegerField') |
| 92 | |
| 93 | def test_has__RealField(self): |
| 94 | self._assert_in_bt2('_RealField') |
| 95 | |
| 96 | def test_has__EnumerationField(self): |
| 97 | self._assert_in_bt2('_EnumerationField') |
| 98 | |
| 99 | def test_has__UnsignedEnumerationField(self): |
| 100 | self._assert_in_bt2('_UnsignedEnumerationField') |
| 101 | |
| 102 | def test_has__SignedEnumerationField(self): |
| 103 | self._assert_in_bt2('_SignedEnumerationField') |
| 104 | |
| 105 | def test_has__StringField(self): |
| 106 | self._assert_in_bt2('_StringField') |
| 107 | |
| 108 | def test_has__StructureField(self): |
| 109 | self._assert_in_bt2('_StructureField') |
| 110 | |
| 111 | def test_has__VariantField(self): |
| 112 | self._assert_in_bt2('_VariantField') |
| 113 | |
| 114 | def test_has__ArrayField(self): |
| 115 | self._assert_in_bt2('_ArrayField') |
| 116 | |
| 117 | def test_has__StaticArrayField(self): |
| 118 | self._assert_in_bt2('_StaticArrayField') |
| 119 | |
| 120 | def test_has__DynamicArrayField(self): |
| 121 | self._assert_in_bt2('_DynamicArrayField') |
| 122 | |
| 123 | def test_has_IntegerDisplayBase(self): |
| 124 | self._assert_in_bt2('IntegerDisplayBase') |
| 125 | |
| 126 | def test_has__IntegerFieldClass(self): |
| 127 | self._assert_in_bt2('_IntegerFieldClass') |
| 128 | |
| 129 | def test_has__UnsignedIntegerFieldClass(self): |
| 130 | self._assert_in_bt2('_UnsignedIntegerFieldClass') |
| 131 | |
| 132 | def test_has__SignedIntegerFieldClass(self): |
| 133 | self._assert_in_bt2('_SignedIntegerFieldClass') |
| 134 | |
| 135 | def test_has__RealFieldClass(self): |
| 136 | self._assert_in_bt2('_RealFieldClass') |
| 137 | |
| 138 | def test_has__EnumerationFieldClass(self): |
| 139 | self._assert_in_bt2('_EnumerationFieldClass') |
| 140 | |
| 141 | def test_has__UnsignedEnumerationFieldClass(self): |
| 142 | self._assert_in_bt2('_UnsignedEnumerationFieldClass') |
| 143 | |
| 144 | def test_has__SignedEnumerationFieldClass(self): |
| 145 | self._assert_in_bt2('_SignedEnumerationFieldClass') |
| 146 | |
| 147 | def test_has__StringFieldClass(self): |
| 148 | self._assert_in_bt2('_StringFieldClass') |
| 149 | |
| 150 | def test_has__StructureFieldClass(self): |
| 151 | self._assert_in_bt2('_StructureFieldClass') |
| 152 | |
| 153 | def test_has__VariantFieldClass(self): |
| 154 | self._assert_in_bt2('_VariantFieldClass') |
| 155 | |
| 156 | def test_has__VariantFieldClassWithoutSelector(self): |
| 157 | self._assert_in_bt2('_VariantFieldClassWithoutSelector') |
| 158 | |
| 159 | def test_has__VariantFieldClassWithSelector(self): |
| 160 | self._assert_in_bt2('_VariantFieldClassWithSelector') |
| 161 | |
| 162 | def test_has__VariantFieldClassWithUnsignedSelector(self): |
| 163 | self._assert_in_bt2('_VariantFieldClassWithUnsignedSelector') |
| 164 | |
| 165 | def test_has__VariantFieldClassWithSignedSelector(self): |
| 166 | self._assert_in_bt2('_VariantFieldClassWithSignedSelector') |
| 167 | |
| 168 | def test_has__ArrayFieldClass(self): |
| 169 | self._assert_in_bt2('_ArrayFieldClass') |
| 170 | |
| 171 | def test_has__StaticArrayFieldClass(self): |
| 172 | self._assert_in_bt2('_StaticArrayFieldClass') |
| 173 | |
| 174 | def test_has__DynamicArrayFieldClass(self): |
| 175 | self._assert_in_bt2('_DynamicArrayFieldClass') |
| 176 | |
| 177 | def test_has_FieldPathScope(self): |
| 178 | self._assert_in_bt2('FieldPathScope') |
| 179 | |
| 180 | def test_has__IndexFieldPathItem(self): |
| 181 | self._assert_in_bt2('_IndexFieldPathItem') |
| 182 | |
| 183 | def test_has__CurrentArrayElementFieldPathItem(self): |
| 184 | self._assert_in_bt2('_CurrentArrayElementFieldPathItem') |
| 185 | |
| 186 | def test_has_Graph(self): |
| 187 | self._assert_in_bt2('Graph') |
| 188 | |
| 189 | def test_has_SignedIntegerRange(self): |
| 190 | self._assert_in_bt2('SignedIntegerRange') |
| 191 | |
| 192 | def test_has_UnsignedIntegerRange(self): |
| 193 | self._assert_in_bt2('UnsignedIntegerRange') |
| 194 | |
| 195 | def test_has_SignedIntegerRangeSet(self): |
| 196 | self._assert_in_bt2('SignedIntegerRangeSet') |
| 197 | |
| 198 | def test_has_UnsignedIntegerRangeSet(self): |
| 199 | self._assert_in_bt2('UnsignedIntegerRangeSet') |
| 200 | |
| 201 | def test_has_Interrupter(self): |
| 202 | self._assert_in_bt2('Interrupter') |
| 203 | |
| 204 | def test_has_LoggingLevel(self): |
| 205 | self._assert_in_bt2('LoggingLevel') |
| 206 | |
| 207 | def test_has_get_minimal_logging_level(self): |
| 208 | self._assert_in_bt2('get_minimal_logging_level') |
| 209 | |
| 210 | def test_has_get_global_logging_level(self): |
| 211 | self._assert_in_bt2('get_global_logging_level') |
| 212 | |
| 213 | def test_has_set_global_logging_level(self): |
| 214 | self._assert_in_bt2('set_global_logging_level') |
| 215 | |
| 216 | def test_has__EventMessage(self): |
| 217 | self._assert_in_bt2('_EventMessage') |
| 218 | |
| 219 | def test_has__PacketBeginningMessage(self): |
| 220 | self._assert_in_bt2('_PacketBeginningMessage') |
| 221 | |
| 222 | def test_has__PacketEndMessage(self): |
| 223 | self._assert_in_bt2('_PacketEndMessage') |
| 224 | |
| 225 | def test_has__StreamBeginningMessage(self): |
| 226 | self._assert_in_bt2('_StreamBeginningMessage') |
| 227 | |
| 228 | def test_has__StreamEndMessage(self): |
| 229 | self._assert_in_bt2('_StreamEndMessage') |
| 230 | |
| 231 | def test_has__MessageIteratorInactivityMessage(self): |
| 232 | self._assert_in_bt2('_MessageIteratorInactivityMessage') |
| 233 | |
| 234 | def test_has__DiscardedEventsMessage(self): |
| 235 | self._assert_in_bt2('_DiscardedEventsMessage') |
| 236 | |
| 237 | def test_has__DiscardedPacketsMessage(self): |
| 238 | self._assert_in_bt2('_DiscardedPacketsMessage') |
| 239 | |
| 240 | def test_has__UserMessageIterator(self): |
| 241 | self._assert_in_bt2('_UserMessageIterator') |
| 242 | |
| 243 | def test_has_find_plugins_in_path(self): |
| 244 | self._assert_in_bt2('find_plugins_in_path') |
| 245 | |
| 246 | def test_has_find_plugins(self): |
| 247 | self._assert_in_bt2('find_plugins') |
| 248 | |
| 249 | def test_has_find_plugin(self): |
| 250 | self._assert_in_bt2('find_plugin') |
| 251 | |
| 252 | def test_has_plugin_component_class(self): |
| 253 | self._assert_in_bt2('plugin_component_class') |
| 254 | |
| 255 | def test_has_register_plugin(self): |
| 256 | self._assert_in_bt2('register_plugin') |
| 257 | |
| 258 | def test_has_QueryExecutor(self): |
| 259 | self._assert_in_bt2('QueryExecutor') |
| 260 | |
| 261 | def test_has_AutoSourceComponentSpec(self): |
| 262 | self._assert_in_bt2('AutoSourceComponentSpec') |
| 263 | |
| 264 | def test_has_ComponentSpec(self): |
| 265 | self._assert_in_bt2('ComponentSpec') |
| 266 | |
| 267 | def test_has_TraceCollectionMessageIterator(self): |
| 268 | self._assert_in_bt2('TraceCollectionMessageIterator') |
| 269 | |
| 270 | def test_has_create_value(self): |
| 271 | self._assert_in_bt2('create_value') |
| 272 | |
| 273 | def test_has_BoolValue(self): |
| 274 | self._assert_in_bt2('BoolValue') |
| 275 | |
| 276 | def test_has__IntegerValue(self): |
| 277 | self._assert_in_bt2('_IntegerValue') |
| 278 | |
| 279 | def test_has_UnsignedIntegerValue(self): |
| 280 | self._assert_in_bt2('UnsignedIntegerValue') |
| 281 | |
| 282 | def test_has_SignedIntegerValue(self): |
| 283 | self._assert_in_bt2('SignedIntegerValue') |
| 284 | |
| 285 | def test_has_RealValue(self): |
| 286 | self._assert_in_bt2('RealValue') |
| 287 | |
| 288 | def test_has_StringValue(self): |
| 289 | self._assert_in_bt2('StringValue') |
| 290 | |
| 291 | def test_has_ArrayValue(self): |
| 292 | self._assert_in_bt2('ArrayValue') |
| 293 | |
| 294 | def test_has_MapValue(self): |
| 295 | self._assert_in_bt2('MapValue') |
| 296 | |
| 297 | def test_has___version__(self): |
| 298 | self._assert_in_bt2('__version__') |