Skip to content

thebruce87m/ceedling-cheat-sheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

ceedling-cheat-sheet

Running

Run all tests

ceedling test:all

Run all tests in test_my_lib.c

ceedling test:test_my_lib

Asserting

TEST_ASSERT

int my_var = 5;
TEST_ASSERT(my_var == 5);

Ignoring Arguments

Internal Pointers

Given the function:

uint32_t time_remaining( timer_t * timer )
{
...
}

We may not have access to the timer pointer to check it, so ignore it:

time_remaining_ExpectAndReturn(NULL, 10); //function returns 10
time_remaining_IgnoreArg_timer();

Check Memory

Add the following to the bottom of project.yml

:flags:
  :test:
    :compile:
      :*:
        - -fsanitize=address
    :link:
      :*:
        - -fsanitize=address

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published