Rtos API example

Embed: (wiki syntax)

« Back to documentation index

find.cpp File Reference

find.cpp File Reference

Test cases to find KVs in the CFSTORE using the drv->Find() interface. More...

Go to the source code of this file.

Functions

control_t cfstore_find_test_01 (const size_t call_count)
 test to call cfstore_find() with a key_name string that exceeds the maximum length
control_t cfstore_find_test_02 (const size_t call_count)
 test to call cfstore_find() with key_name that in includes illegal characters

  • the character can be at the beginning of the key_name
  • the character can be at the end of the key_name
  • the character can be somewhere within the key_name string

control_t cfstore_find_test_03_end (const size_t call_count)
 test to call cfstore_find() with key_name that in includes illegal characters

  • the character can be at the beginning of the key_name
  • the character can be at the end of the key_name
  • the character can be somewhere within the key_name string

control_t cfstore_find_test_04 (const size_t call_count)
 TODO: write test that uses cfstore_find_test_04_kv_data to grow {key, value} from 1 char to 221 chars long.
static bool cfstore_find_key_name_validate (const char *key_name, const char *match, bool should_find)
 function to test whether a key name is valid, can be added to the cfstore and found by a wildcard string
control_t cfstore_find_test_05_end (const size_t call_count)
 test whether a key name in the above table are valid, can be added to the cfstore and found by a wildcard string
control_t cfstore_find_test_06_end (const size_t call_count)
 test to use find to find at least 2 entries in the cfstore, but the query string doesnt match the last 2 entries in the store.
control_t cfstore_find_test_07_end (const size_t call_count)
 test case to check Find() with previous NULL pointer works

Detailed Description

Test cases to find KVs in the CFSTORE using the drv->Find() interface.

Please consult the documentation under the test-case functions for a description of the individual test case.

Definition in file find.cpp.


Function Documentation

static bool cfstore_find_key_name_validate ( const char *  key_name,
const char *  match,
bool  should_find 
) [static]

function to test whether a key name is valid, can be added to the cfstore and found by a wildcard string

Parameters:
key_namename of the key to create in the store
matchstring to use to try and find key_name in the cfstore
should_findif true, then 'match' should find 'key_name' in the store if false, then 'match' should not find 'key_name' in the store
Returns:
status code ARM_DRIVER_OK, the test passed successfully ret < ARM_DRIVER_OK, the test failed with the return code supplying more details

Definition at line 245 of file find.cpp.

control_t cfstore_find_test_01 ( const size_t  call_count )

test to call cfstore_find() with a key_name string that exceeds the maximum length

Returns:
on success returns CaseNext to continue to next test case, otherwise will assert on errors.

Definition at line 73 of file find.cpp.

control_t cfstore_find_test_02 ( const size_t  call_count )

test to call cfstore_find() with key_name that in includes illegal characters

  • the character can be at the beginning of the key_name
  • the character can be at the end of the key_name
  • the character can be somewhere within the key_name string

Returns:
on success returns CaseNext to continue to next test case, otherwise will assert on errors.

Definition at line 92 of file find.cpp.

control_t cfstore_find_test_03_end ( const size_t  call_count )

test to call cfstore_find() with key_name that in includes illegal characters

  • the character can be at the beginning of the key_name
  • the character can be at the end of the key_name
  • the character can be somewhere within the key_name string

Returns:
on success returns CaseNext to continue to next test case, otherwise will assert on errors.

Definition at line 121 of file find.cpp.

control_t cfstore_find_test_04 ( const size_t  call_count )

TODO: write test that uses cfstore_find_test_04_kv_data to grow {key, value} from 1 char to 221 chars long.

Returns:
on success returns CaseNext to continue to next test case, otherwise will assert on errors.

Definition at line 214 of file find.cpp.

control_t cfstore_find_test_05_end ( const size_t  call_count )

test whether a key name in the above table are valid, can be added to the cfstore and found by a wildcard string

Returns:
on success returns CaseNext to continue to next test case, otherwise will assert on errors.

Definition at line 318 of file find.cpp.

control_t cfstore_find_test_06_end ( const size_t  call_count )

test to use find to find at least 2 entries in the cfstore, but the query string doesnt match the last 2 entries in the store.

Returns:
on success returns CaseNext to continue to next test case, otherwise will assert on errors.

Definition at line 389 of file find.cpp.

control_t cfstore_find_test_07_end ( const size_t  call_count )

test case to check Find() with previous NULL pointer works

Returns:
on success returns CaseNext to continue to next test case, otherwise will assert on errors.

Definition at line 445 of file find.cpp.