Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nbittich committed Dec 1, 2024
1 parent e6da8bc commit 1389b3d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/iri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ mod test {

#[test]
fn test_hex_st_to_char() {
println!("{}", u8::from_str_radix("3A", 16).unwrap() as char);
assert_eq!(':', u8::from_str_radix("3A", 16).unwrap() as char);
}
#[test]
fn parse_ip_v4_test() {
Expand Down
11 changes: 9 additions & 2 deletions src/tests/turtle_doc_test_misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::{
},
};
use serial_test::serial;
use std::borrow::Cow;
use std::{borrow::Cow, sync::Arc};
use Cow::Borrowed;
use Node::Iri;

Expand Down Expand Up @@ -60,7 +60,14 @@ fn turtle_doc_list_statements_test() {
let turtle: TurtleDoc = (doc, None).try_into().unwrap();
let statements = turtle.list_statements(None, None, Some(&Iri(Borrowed("[email protected]"))));
assert_eq!(1, statements.len());
println!("{statements:?}");
assert_eq!(
statements,
vec![&Statement {
subject: Node::Ref(Arc::new(Node::LabeledBlankNode("10".into()))),
predicate: Node::Iri(Cow::Borrowed("http://foaf.com/mbox")),
object: Node::Iri(Cow::Borrowed("[email protected]"))
}]
);
let statement = statements[0];
let statements = turtle.list_statements(Some(&statement.subject), None, None);
assert_eq!(5, statements.len());
Expand Down

0 comments on commit 1389b3d

Please sign in to comment.