#include <stan/math/prim/mat.hpp>
#include <gtest/gtest.h>

TEST(MathMatrixPrimMat, singular_values) {
  using stan::math::singular_values;

  stan::math::matrix_d m0(0, 0);
  EXPECT_NO_THROW(singular_values(m0));

  stan::math::matrix_d m1(1, 1);
  m1 << 1.0;
  EXPECT_NO_THROW(singular_values(m1));
}

#include <stan/math/prim/mat.hpp>
#include <gtest/gtest.h>

TEST(MathMatrixPrimMat, singular_values) {
  stan::math::matrix_d m0(1, 1);
  m0 << 1.0;

  using stan::math::singular_values;
  EXPECT_NO_THROW(singular_values(m0));
}

--- 
+++ 
@@ -2,9 +2,12 @@
 #include <gtest/gtest.h>
 
 TEST(MathMatrixPrimMat, singular_values) {
-  stan::math::matrix_d m0(1, 1);
-  m0 << 1.0;
+  using stan::math::singular_values;
 
-  using stan::math::singular_values;
+  stan::math::matrix_d m0(0, 0);
   EXPECT_NO_THROW(singular_values(m0));
+
+  stan::math::matrix_d m1(1, 1);
+  m1 << 1.0;
+  EXPECT_NO_THROW(singular_values(m1));
 }
Add prim test for size zero input
