Skip to content

Commit

Permalink
Merge pull request swirldev#24 from swirldev/runTest_equivalent
Browse files Browse the repository at this point in the history
Solves swirl issue swirldev#171 for Data Analysis, Central Tendency
  • Loading branch information
WilCrofter committed Jul 1, 2014
2 parents b1d4788 + 40c4c14 commit 841bf91
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Data_Analysis/Central_Tendency/customTests.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,12 @@ runTest.exact <- function(keyphrase,e){
is.correct <- abs(e$val-correct.ans) <= epsilon
}
return(isTRUE(is.correct))
}
}

# Returns TRUE if as.expression
# (e$expr) matches the expression indicated to the right
# of "=" in keyphrase
# keyphrase:equivalent=expression
runTest.equivalent <- function(keyphrase,e) {
return(omnitest(rightside(keyphrase)))
}

0 comments on commit 841bf91

Please sign in to comment.