diff options
author | lewuathe <lewuathe@me.com> | 2015-08-18 15:30:23 -0700 |
---|---|---|
committer | Joseph K. Bradley <joseph@databricks.com> | 2015-08-18 15:30:23 -0700 |
commit | c635a16f64c939182196b46725ef2d00ed107cca (patch) | |
tree | cbef3f5c49ffb7a12118ce88372994cb03354328 | |
parent | 1dbffba37a84c62202befd3911d25888f958191d (diff) | |
download | spark-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.
-rw-r--r-- | mllib/src/test/scala/org/apache/spark/ml/param/ParamsSuite.scala | 3 |
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") { |