Simplified doc-site generation
[AGL/documentation.git] / docs / 4_APIs_and_Services / 4.4_AGL_Test_Framework / 5_Reference / 4_LuaUnit_Assertion_Functions / 5_Type_Assertions.md
1 ---
2 edit_link: ''
3 title: Type Assertions
4 origin_url: >-
5   https://git.automotivelinux.org/apps/app-afb-test/plain/docs/Reference/LuaUnitAssertionFunctions/5_TypeAssertions.md?h=master
6 ---
7
8 <!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/apis_services/master/app-afb-test-developer-guides-api-services-book.yml -->
9
10 # Type assertions
11
12 The following functions all perform type checking on their argument. If the
13 received value is not of the right type, the failure message will contain the
14 expected type, the received type and the received value to help you identify
15 better the problem.
16
17 * **_AFT.assertIsNumber(value)**
18
19     Assert that the argument is a number (integer or float)
20
21 * **_AFT.assertIsString(value)**
22
23     Assert that the argument is a string.
24
25 * **_AFT.assertIsTable(value)**
26
27     Assert that the argument is a table.
28
29 * **_AFT.assertIsBoolean(value)**
30
31     Assert that the argument is a boolean.
32
33 * **_AFT.assertIsFunction(value)**
34
35     Assert that the argument is a function.
36
37 * **_AFT.assertIsUserdata(value)**
38
39     Assert that the argument is a userdata.
40
41 * **_AFT.assertIsThread(value)**
42
43     Assert that the argument is a coroutine (an object with type thread ).
44
45 * **_AFT.assertNotIsThread(value)**
46
47     Assert that the argument is a not coroutine (an object with type thread ).