aboutsummaryrefslogtreecommitdiff
path: root/mllib/src
diff options
context:
space:
mode:
authorlewuathe <lewuathe@me.com>2015-08-18 15:30:23 -0700
committerJoseph K. Bradley <joseph@databricks.com>2015-08-18 15:30:23 -0700
commitc635a16f64c939182196b46725ef2d00ed107cca (patch)
treecbef3f5c49ffb7a12118ce88372994cb03354328 /mllib/src
parent1dbffba37a84c62202befd3911d25888f958191d (diff)
downloadspark-c635a16f64c939182196b46725ef2d00ed107cca.tar.gz
spark-c635a16f64c939182196b46725ef2d00ed107cca.tar.bz2
spark-c635a16f64c939182196b46725ef2d00ed107cca.zip
[SPARK-10012] [ML] Missing test case for Params#arrayLengthGt
Currently there is no test case for `Params#arrayLengthGt`. Author: lewuathe <lewuathe@me.com> Closes #8223 from Lewuathe/SPARK-10012.
Diffstat (limited to 'mllib/src')
-rw-r--r--mllib/src/test/scala/org/apache/spark/ml/param/ParamsSuite.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/mllib/src/test/scala/org/apache/spark/ml/param/ParamsSuite.scala b/mllib/src/test/scala/org/apache/spark/ml/param/ParamsSuite.scala
index be95638d81..2c878f8372 100644
--- a/mllib/src/test/scala/org/apache/spark/ml/param/ParamsSuite.scala
+++ b/mllib/src/test/scala/org/apache/spark/ml/param/ParamsSuite.scala
@@ -199,6 +199,9 @@ class ParamsSuite extends SparkFunSuite {
val inArray = ParamValidators.inArray[Int](Array(1, 2))
assert(inArray(1) && inArray(2) && !inArray(0))
+
+ val arrayLengthGt = ParamValidators.arrayLengthGt[Int](2.0)
+ assert(arrayLengthGt(Array(0, 1, 2)) && !arrayLengthGt(Array(0, 1)))
}
test("Params.copyValues") {