Repository navigation
test: Characterize obs-properties.c before port - #830
Merged
Merged
Conversation
C only, no Rust: test_obs_properties pins creation, every property type's getters and setters, wrong-type defaults, lookup and removal through groups, tree-wide unique names, group recursion and clash checks, list and frame-rate items, buttons, and the modified/ apply_settings callback order. Odd cases are marked characterized, not endorsed. Refs #828
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #828 (step 1 of the claim: characterization, no Rust).
New Tier 2 test
test/cmocka/test_obs_properties.c(registered viatests.d/test_obs_properties.cmake; no existing test edited). It pins the current C behavior oflibobs/obs-properties.c:obs_properties_add_*type with its getters and setters, and the defaults each getter returns for the wrong type;priv;obs_property_modified(topmost parent) andobs_properties_apply_settings(group content before the group, called back in reverse, with the props it was called on).Characterized, not endorsed: the list bool getter reads the union's
double; a directory path drops its filter; a non-button's URL is""but a button without one is NULL; a non-group's group type isOBS_COMBO_INVALID.Left out so the test stays sanitizer-clean, worth their own issues: a
FILE_SAVEpath's filter is never freed, andobs_property_button_set_urlleaks the previous URL.Local:
rust/tools/linux-validate/run.sh --repeat 3 --tests test_obs_properties: 245/245 OFF and ON, 3 repeats each;./lintok.