Skip to content
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

Merged
merged 9 commits into from
Feb 21, 2025
Merged

updated test suits #298

merged 9 commits into from
Feb 21, 2025

Conversation

Kali-05
Copy link

@Kali-05 Kali-05 commented Feb 18, 2025

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

Copy link
Collaborator

@kavitharaju kavitharaju left a 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.

Comment on lines 32 to 49
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"],
}
}
}
Copy link
Collaborator

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?

Copy link
Author

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 .

Comment on lines 327 to 330
// Test functions
#[cfg(test)]
mod tests {
use rust_usfm::usj_generator::usj_generator;
Copy link
Collaborator

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.

Copy link
Collaborator

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.

@kavitharaju kavitharaju merged commit 0d64b9c into Bridgeconn:rust Feb 21, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants