#include "stic.h"
TEST(strings_equal)
{
char *s = "hello";
assert_string_equal("hello", s);
}
TEST(arrays_equal)
{
unsigned char expected_bytes[] = { 1, 2, 3};
unsigned char buffer[5];
int i;
// put 5 bytes in
for(i=0; i<5; i++) buffer[i]=i+1;
// only check the first 3
assert_n_array_equal(expected_bytes, buffer, 3);
}
TEST(bits)
{
assert_bit_set(0, 0x01);
assert_bit_set(2, 0x04);
assert_bit_not_set(3, 0x02);
}
TEST(strings)
{
char *s = "hello";
assert_string_equal("hello", s);
assert_string_contains("blah", "why say blah?");
assert_string_doesnt_contain("blah", "why say hello?");
assert_string_ends_with("h?", "why say blah?");
assert_string_starts_with("why", "why say blah?");
}
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"
Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/stic
Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/stic
You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a
pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master