Unity Test Completions
Unity - Unit Testing for C Completions for Sublime Text
Details
Installs
- Total 152
- Win 108
- Mac 23
- Linux 21
Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | Feb 16 | Feb 15 | Feb 14 | Feb 13 | Feb 12 | Feb 11 | Feb 10 | Feb 9 | Feb 8 | Feb 7 | Feb 6 | Feb 5 | Feb 4 | Feb 3 | Feb 2 | Feb 1 | Jan 31 | Jan 30 | Jan 29 | Jan 28 | Jan 27 | Jan 26 | Jan 25 | Jan 24 | Jan 23 | Jan 22 | Jan 21 | Jan 20 | Jan 19 | Jan 18 | Jan 17 | Jan 16 | Jan 15 | Jan 14 | Jan 13 | Jan 12 | Jan 11 | Jan 10 | Jan 9 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Unity Test Completions
Sublime Text completions package for Unity - Unit Testing For C (Especially Embedded Software).
Installation
The preferred method of installing the Unity Test Completions
package is using Package Control.
With Package Control installed:
- Open the command palette
- Select
Package Control: Install Packages
- Type
Unity Test Completions
to narrow down the selection - Click the package listing to install.
When you launch Sublime Text, it will pick up the contents of this package.
Unity Completions
Unity completions are scope sensitive and require use of a C
syntax that correctly identifies function blocks.
The snippets are known to work with:
- Built-in Sublime Text
C
syntax - C99
- C Improved
Unit Test Function Templates
Unit test method function templates are active when the caret is outside a function body.
Shortcut | Assertion |
---|---|
test |
test_function_should template |
testw |
test_function_should_when template |
testi |
test_function_should template with TEST_IGNORE(message) |
testf |
test_function_should template with TEST_FAIL(message) |
Unity Assert Completions
Unity test assert
snippets are active when the caret is positioned within a function body .
Snippets are triggered by abbreviation of the assert name. With the exception of the “fail and ignore” completions the trigger is the first letter of each word in the name, ignoring the test prefix.
Note that abbreviations can resolve to more than one snippet.
For example aem
is used for assert_empty_message
, assert_equal_message
and assert_equal_memory
.
Available Completions
The package provides: - 467 completions for Unity covering base and message variations, and - four test function templates
The Unity Assertions Reference provides a detailed reference to the assertions.
Basic fail and ignore
Shortcut | Assertion |
---|---|
pa |
TEST_PASS |
pam |
TEST_PASS_MESSAGE |
fa |
TEST_FAIL |
fam |
TEST_FAIL_MESSAGE |
ig |
TEST_IGNORE |
igm |
TEST_IGNORE_MESSAGE |
boolean
types
Shortcut | Assertion |
---|---|
at |
TEST_ASSERT_TRUE |
au |
TEST_ASSERT_UNLESS |
af |
TEST_ASSERT_FALSE |
an |
TEST_ASSERT_NULL |
ann |
TEST_ASSERT_NOT_NULL |
ae |
TEST_ASSERT_EMPTY |
ane |
TEST_ASSERT_NOT_EMPTY |
integer
types
Shortcut | Assertion |
---|---|
aex |
TEST_ASSERT_EQUAL_X |
aeex |
TEST_ASSERT_EACH_EQUAL_X |
agtx |
TEST_ASSERT_GREATER_THAN_X |
agoex |
TEST_ASSERT_GREATER_OR_EQUAL_X |
altx |
TEST_ASSERT_LESS_THAN_X |
aloex |
TEST_ASSERT_LESS_OR_EQUAL_X |
anex |
TEST_ASSERT_NOT_EQUAL_X |
axw |
TEST_ASSERT_X_WITHIN |
aexa |
TEST_ASSERT_EQUAL_X_ARRAY |
axaw |
TEST_ASSERT_X_ARRAY_WITHIN |
Where x
is:
i
,i8
,i16
,i32
,i64
u
,u8
,u16
,u32
,u64
h
,h8
,h16
,h32
,h64
c
: charsz
: size_t
double
and float
types
Shortcut | Assertion |
---|---|
axw |
TEST_ASSERT_X_WITHIN |
aex |
TEST_ASSERT_EQUAL_X |
aexa |
TEST_ASSERT_EQUAL_X_ARRAY |
aeex |
TEST_ASSERT_EACH_EQUAL_X |
Where x
is:
d
: doublef
: float
struct
and string
types
Shortcut | Assertion |
---|---|
aeex |
TEST_ASSERT_EACH_EQUAL_X |
aex |
TEST_ASSERT_EQUAL_X |
aexa |
TEST_ASSERT_EQUAL_X_ARRAY |
Where x
is:
p
: pointers
: stringm
: memory
Messages
Append m
to a trigger to access the message variant.