Skip to content

Commit

Permalink
#110 fix tests & improve getNamespaceDefinitions
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Sep 10, 2018
1 parent 70dc6a6 commit 836e2e8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R/ISOAbstractObject.R
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ ISOAbstractObject <- R6Class("ISOAbstractObject",
}
}
}))

nsdefs <- nsdefs[!duplicated(names(nsdefs))]
return(nsdefs)
},

Expand Down
6 changes: 4 additions & 2 deletions tests/testthat/test_GMLRectifiedGrid.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ context("GMLRectifiedGrid")
test_that("GMLRectifiedGrid",{
#encoding
md <- GMLRectifiedGrid$new()
md$setGridEnvelope(0, 500, 0, 500)
md$setAxisLabels("E", "N")
m <- matrix(c(-180,180,-90, 90), nrow = 2, ncol = 2, byrow = TRUE,
dimnames = list(c("x", "y"), c("min","max")))
md$setGridEnvelope(m = m)
md$setAxisLabels(c("E", "N"))
md$setOrigin(15,15)
md$addOffsetVector(c(0,15))
xml <- md$encode()
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test_GMLReferenceableGrid.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ context("GMLReferenceableGrid")
test_that("GMLAbstractReferenceableGrid",{
#encoding
md <- GMLAbstractReferenceableGrid$new()
envelope <- matrix(c(0,500,0,500),2,2)
md$setGridEnvelope(envelope)
m <- matrix(c(0,500,0,500),2,2)
md$setGridEnvelope(m = m)
md$setAxisLabels(c("E", "N"))
xml <- md$encode(validate = FALSE)
expect_is(xml, "XMLInternalNode")
Expand Down

0 comments on commit 836e2e8

Please sign in to comment.