Skip to content

Commit

Permalink
small change to test_toplevel to plot phylos at same time, added tidy…
Browse files Browse the repository at this point in the history
…ing in test_parsing and test_serializing
  • Loading branch information
sckott committed Sep 5, 2013
1 parent c949693 commit ced59fb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions inst/tests/test_parsing.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ test_that("We can parse a NeXML file to an S4 RNeXML::tree object", {
doc <- xmlParse(f)
root <- xmlRoot(doc)
nexml <- as(root, "nexml") ## parse the XML into S4
expect_is(nexml,"nexml")
})
2 changes: 2 additions & 0 deletions inst/tests/test_serializing.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ test_that("We can serialize parsed NeXML to S4 RNeXML into valid NeXML",{
tree <- as(root, "nexml")
nexml_write(tree, "test.xml")

#! change directory to something that will work across machines if possible

# results <- xmlSchemaValidate("http://www.nexml.org/2009/nexml.xsd", "test.xml")
results <- xmlSchemaValidate("~/Documents/code/thirdparty/nexml/xsd/nexml.xsd", "test.xml")
expect_equal(results$status, 0)
Expand Down
4 changes: 3 additions & 1 deletion inst/tests/test_toplevel_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ test_that("read.nexml works (to ape::phylo)", {
f <- system.file("examples", "trees.xml", package="RNeXML")
phy <- nexml_read(f, type="phylo")
# phy <- read.nexml(f, type="phylo")
plot(phy)
layout(matrix(1:2, 1, 2), c(5, 4))
plot(phy[[1]])
plot(phy[[2]])
})

test_that("write.nexml works (from ape::phylo)", {
Expand Down

0 comments on commit ced59fb

Please sign in to comment.