-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updated test suits #298
updated test suits #298
Conversation
Add link to demo in readme
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also give a stat of how many of the test passed and failed for the added test cases? I expect it to be all fail, but it is to keep track of it. You can add it in the PR description.
rust-usfm-parser/tests/test_utils.rs
Outdated
impl USFMMarker { | ||
fn get_markers(&self) -> Vec<&'static str> { | ||
match self { | ||
USFMMarker::BookHeaders => vec!["ide", "usfm", "h", "toc", "toca"], | ||
USFMMarker::Titles => vec![ | ||
"mt", "mte", "cl", "cd", "ms", "mr", "s", "sr", "r", "d", "sp", "sd", | ||
], | ||
USFMMarker::Comments => vec!["sts", "rem", "lit", "restore"], | ||
USFMMarker::Paragraphs => vec!["p", "m", "po", "pr", "cls", "pmo", "pm", "pmc"], | ||
USFMMarker::Characters => vec![ | ||
"add", "bk", "dc", "ior", "iqt", "k", "litl", "nd", "ord", "pn", | ||
], | ||
USFMMarker::Notes => vec!["f", "fe", "ef", "efe", "x", "ex"], | ||
USFMMarker::StudyBible => vec!["esb", "cat"], | ||
USFMMarker::BCV => vec!["id", "c", "v"], | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this defined here? Is it part of testing logic or core logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry mam, its part of the core logic ,i used it while implimenting the code for test case,forget to change .it doesnt have any function in the code .
rust-usfm-parser/tests/test_utils.rs
Outdated
// Test functions | ||
#[cfg(test)] | ||
mod tests { | ||
use rust_usfm::usj_generator::usj_generator; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be good to keep tests in a separate file and keep only utility functions here. As we add more testing code it we help us maintain modularity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test_usj.rs would be good.
test suits added for
comparing with test suit samples
for testing usj output is valid
to test whether all markers in input are in output
and verified
currently 0 test cases are passed