File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 6464 * - VneV
6565 * - overload operator "!=" to assert
6666 * - the inequality between two 3d vectors
67+ * - VltV
68+ * - overload operator "<" to sort
69+ * - the "less than" relationship between two 3d vectors
6770 * - StdOutV
6871 * - overload operator "<<" to print out
6972 * - a 3d vectors on standard output
@@ -703,6 +706,22 @@ TEST_F(Vector3Test,VneV)
703706 EXPECT_TRUE (wp != w);
704707}
705708
709+ TEST_F (Vector3Test, VltV)
710+ {
711+ ModuleBase::Vector3<double > u, up;
712+ u.set (da, db, dc);
713+ up.set (dc, db, da);
714+ EXPECT_TRUE (u < up);
715+ ModuleBase::Vector3<float > v, vp;
716+ v.set (fa, fb, fc);
717+ vp.set (fa, fb, fc);
718+ EXPECT_FALSE (v < vp);
719+ ModuleBase::Vector3<int > w, wp;
720+ w.set (ia, ib, ic);
721+ wp.set (ib, ib, ic);
722+ EXPECT_TRUE (w < wp);
723+ }
724+
706725TEST_F (Vector3Test,StdOutV)
707726{
708727 // double Vector3
You can’t perform that action at this time.
0 commit comments