Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3858 from lawli3t/improve-tests-keyset
Browse files Browse the repository at this point in the history
Add additional tests for module keyset
  • Loading branch information
mpranj authored Jul 8, 2021
2 parents 4497a45 + 3e0707b commit 773b53f
Show file tree
Hide file tree
Showing 22 changed files with 106 additions and 43 deletions.
6 changes: 3 additions & 3 deletions doc/api_review/core/ksAppend.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@
### Tests

- [ ] Function code is fully covered by tests
- [ ] Line 923
- [x] Line 923
- [ ] All possible error states are covered by tests
- [ ] add test case for `ks == NULL`
- [ ] add test case for `toAppend == NULL`
- [x] add test case for `ks == NULL`
- [x] add test case for `toAppend == NULL`
- All possible enum values are covered by tests
- [x] No inconsistencies between tests and documentation

Expand Down
6 changes: 3 additions & 3 deletions doc/api_review/core/ksAppendKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@
- [ ] Line 812:813
- [ ] Line 853:855
- [ ] All possible error states are covered by tests
- [ ] `ks == NULL`
- [ ] `toAppend == NULL`
- [ ] `toAppend->key == NULL`
- [x] `ks == NULL`
- [x] `toAppend == NULL`
- [x] `toAppend->key == NULL`
- All possible enum values are covered by tests
- [x] No inconsistencies between tests and documentation

Expand Down
2 changes: 1 addition & 1 deletion doc/api_review/core/ksAtCursor.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@

- [x] Function code is fully covered by tests
- [ ] All possible error states are covered by tests
- [ ] add test case for `pos` >= `ks->size`
- [x] add test case for `pos` >= `ks->size`
- All possible enum values are covered by tests
- [x] No inconsistencies between tests and documentation

Expand Down
4 changes: 2 additions & 2 deletions doc/api_review/core/ksCopy.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@

- [x] Function code is fully covered by tests
- [ ] All possible error states are covered by tests
- [ ] `dest == NULL`
- [ ] `source == NULL`
- [x] `dest == NULL`
- [x] `source == NULL`
- All possible enum values are covered by tests
- [x] No inconsistencies between tests and documentation

Expand Down
2 changes: 1 addition & 1 deletion doc/api_review/core/ksCurrent.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

- [x] Function code is fully covered by tests
- [ ] All possible error states are covered by tests
- [ ] `ks == NULL`
- [x] `ks == NULL`
- All possible enum values are covered by tests
- [x] No inconsistencies between tests and documentation

Expand Down
10 changes: 5 additions & 5 deletions doc/api_review/core/ksCut.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@
- [ ] fully covered yes, but no return value is ever checked
- [ ] add test case for the example at least
- [ ] All possible error states are covered by tests
- [ ] `ks == NULL`
- [ ] `cutpoint == NULL`
- [ ] `!ks->array`
- [ ] `cutpoint->key == NULL`
- [ ] `cutpoint->key == ''`
- [x] `ks == NULL`
- [x] `cutpoint == NULL`
- [x] `!ks->array`
- [x] `cutpoint->key == NULL`
- [x] `cutpoint->key == ''`
- All possible enum values are covered by tests
- [x] No inconsistencies between tests and documentation

Expand Down
2 changes: 1 addition & 1 deletion doc/api_review/core/ksDel.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

- [x] Function code is fully covered by tests
- [ ] All possible error states are covered by tests
- [ ] add test for `keyset == NULL`
- [x] add test for `keyset == NULL`
- All possible enum values are covered by tests
- [x] No inconsistencies between tests and documentation

Expand Down
4 changes: 2 additions & 2 deletions doc/api_review/core/ksDup.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@
### Tests

- [ ] Function code is fully covered by tests
- [ ] return value is never checked
- [x] return value is never checked
- [ ] All possible error states are covered by tests
- [ ] add test case for `source == NULL`
- [x] add test case for `source == NULL`
- All possible enum values are covered by tests
- [x] No inconsistencies between tests and documentation

Expand Down
4 changes: 2 additions & 2 deletions doc/api_review/core/ksGetCursor.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
- [ ] Function code is fully covered by tests
- Line 1665
- [ ] All possible error states are covered by tests
- [ ] add test case if current cursor is at `NULL`
- [ ] add test case if current ks is `NULL`
- [x] add test case if current cursor is at `NULL`
- [x] add test case if current ks is `NULL`
- All possible enum values are covered by tests
- [x] No inconsistencies between tests and documentation

Expand Down
3 changes: 2 additions & 1 deletion doc/api_review/core/ksGetSize.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@

- [x] Function code is fully covered by tests
- [ ] All possible error states are covered by tests
- [ ] add test for `ks == NULL`
- [ ] add test for `ks == NULL`
// todo
- All possible enum values are covered by tests
- [x] No inconsistencies between tests and documentation

Expand Down
6 changes: 3 additions & 3 deletions doc/api_review/core/ksHead.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@
- [ ] Function code is fully covered by tests
- [ ] Line 1550
- [ ] All possible error states are covered by tests
- [ ] add test case for `ks == NULL`
- [ ] add test case for `ks->size == 0`
- [ ] check if `ksCurrent == NULL` if `ksCurrent == ksHead`
- [x] add test case for `ks == NULL`
- [x] add test case for `ks->size == 0`
- [x] check if `ksCurrent == NULL` if `ksCurrent == ksHead`
- All possible enum values are covered by tests
- [x] No inconsistencies between tests and documentation

Expand Down
2 changes: 1 addition & 1 deletion doc/api_review/core/ksLookup.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
- [x] Function code is fully covered by tests
- [x] All possible error states are covered by tests
- [ ] All possible enum values are covered by tests
- [ ] `KDB_O_DEL`
- [x] `KDB_O_DEL`
- [x] No inconsistencies between tests and documentation

## Summary
Expand Down
8 changes: 5 additions & 3 deletions doc/api_review/core/ksLookupByName.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,13 @@

- [x] Function code is fully covered by tests
- [ ] All possible error states are covered by tests
- [ ] `name == NULL`
- [x] `name == NULL`
- [ ] All possible enum values are covered by tests
- [ ] `KDB_O_DEL`
- [ ] `KDB_O_DEL`
// todo
- [ ] No inconsistencies between tests and documentation
- [ ] several flags used in test, that cant be found in the documentation for `ksLookup()` or `elektraLookupFlags`
- [ ] several flags used in test, that cant be found in the documentation for `ksLookup()` or `elektraLookupFlags`
// todo

## Summary

Expand Down
2 changes: 1 addition & 1 deletion doc/api_review/core/ksNew.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@

- [x] Function code is fully covered by tests
- [ ] All possible error states are covered by tests
- [ ] see review for `ksVNew()` as this is a wrapper for this
- [x] see review for `ksVNew()` as this is a wrapper for this
- All possible enum values are covered by tests
- [x] No inconsistencies between tests and documentation

Expand Down
4 changes: 2 additions & 2 deletions doc/api_review/core/ksNext.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@
- [ ] Function code is fully covered by tests
- [ ] Line 1499
- [ ] All possible error states are covered by tests
- [ ] test case for iterating over empty keyset
- [ ] test case for `ks == NULL`
- [x] test case for iterating over empty keyset
- [x] test case for `ks == NULL`
- All possible enum values are covered by tests
- [x] No inconsistencies between tests and documentation

Expand Down
3 changes: 2 additions & 1 deletion doc/api_review/core/ksPop.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@

- [x] Function code is fully covered by tests
- [ ] All possible error states are covered by tests
- [ ] `ks == NULL`
- [ ] `ks == NULL`
// todo
- All possible enum values are covered by tests
- [ ] No inconsistencies between tests and documentation

Expand Down
2 changes: 1 addition & 1 deletion doc/api_review/core/ksRewind.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@

- [x] Function code is fully covered by tests
- [ ] All possible error states are covered by tests
- [ ] add test for `ks == NULL`
- [x] add test for `ks == NULL`
- All possible enum values are covered by tests
- [x] No inconsistencies between tests and documentation

Expand Down
4 changes: 2 additions & 2 deletions doc/api_review/core/ksSetCursor.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@

- [x] Function code is fully covered by tests
- [ ] All possible error states are covered by tests
- [ ] `ks == NULL`
- [ ] `cursor == -1`
- [x] `ks == NULL`
- [x] `cursor == -1`
- All possible enum values are covered by tests
- [x] No inconsistencies between tests and documentation

Expand Down
6 changes: 3 additions & 3 deletions doc/api_review/core/ksTail.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@
- [ ] Function code is fully covered by tests
- [ ] Line 1576
- [ ] All possible error states are covered by tests
- [ ] add test case for `ks == NULL`
- [ ] add test case for `ks->size == 0`
- [ ] check if `ksCurrent == ksTail` if `ksNext == NULL`
- [x] add test case for `ks == NULL`
- [x] add test case for `ks->size == 0`
- [x] check if `ksCurrent == ksTail` if `ksNext == NULL`
- All possible enum values are covered by tests
- [x] No inconsistencies between tests and documentation

Expand Down
6 changes: 3 additions & 3 deletions doc/api_review/core/ksVNew.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@
### Tests

- [ ] Function code is fully covered by tests
- [ ] Line 254
- [ ] Line 270
- [x] Line 254
- [x] Line 270
- [ ] All possible error states are covered by tests
- [ ] above error cases seem hard to test
- [x] above error cases seem hard to test
- All possible enum values are covered by tests
- [x] No inconsistencies between tests and documentation

Expand Down
1 change: 1 addition & 0 deletions doc/news/_preparation_next_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ you up to date with the multi-language support provided by Elektra.
- <<TODO>>
- Upgrade GoogleTest frameworks to version 1.11.0. _(Mihael Pranjić)_
- Add additional test cases for module `keyname` _(@lawli3t)_
- Add tests for module keyset _(@lawli3t)_
- <<TODO>>
- <<TODO>>

Expand Down
Loading

0 comments on commit 773b53f

Please sign in to comment.