Example #1
0
bool Matrix2x::operator>= (const Matrix2x& rkM) const
{
    return CompareArrays(rkM) >= 0;
}
Example #2
0
bool CDecoder::CheckPasswordVerifyCode()
{
  return CompareArrays(_key.PwdVerifComputed, _pwdVerifFromArchive, kPwdVerifCodeSize);
}
Example #3
0
//----------------------------------------------------------------------------
bool CColorRGB::operator> (const CColorRGB& rkC) const
{
    return CompareArrays(rkC) > 0;
}
Example #4
0
//----------------------------------------------------------------------------
bool CColorRGBA::operator>= (const CColorRGBA& rkC) const
{
    return CompareArrays(rkC) >= 0;
}
Example #5
0
 * Description : Unit test to test Lab #15 Functionality
 */
#define CATCH_CONFIG_MAIN
#include "catch.hpp"

#include "sorting.h"
bool GRADER = false;

TEST_CASE("Bubble Sort") {
  int main[5] = { 10, 20, 30, 40, 50 };
  int test[5] = { 50, 40, 30, 20, 10 };
  int passes = -1;

  SECTION("BubbleSort({50, 40, 30, 20, 10})") {
    passes = BubbleSort(test, 5);
    CHECK(CompareArrays(main, test, 5));
    CHECK(passes == 4);
  }

  SECTION("BubbleSort({10, 20, 30, 40, 50})") {
    test[0] = 10, test[1] = 20, test[2] = 30, test[3] = 40, test[4] = 50;
    passes = BubbleSort(test, 5);
    CHECK(CompareArrays(main, test, 5));
    CHECK(passes == 4);
  }

  SECTION("BubbleSort({10, 30, 20, 50, 40})") {
    test[0] = 10, test[1] = 30, test[2] = 20, test[3] = 50, test[4] = 40;
    passes = BubbleSort(test, 5);
    CHECK(CompareArrays(main, test, 5));
    CHECK(passes == 4);
Example #6
0
//----------------------------------------------------------------------------
bool ColorRGB::operator<= (const ColorRGB& rkC) const
{
    return CompareArrays(rkC) <= 0;
}
Example #7
0
//----------------------------------------------------------------------------
bool ColorRGBA::operator< (const ColorRGBA& rkC) const
{
    return CompareArrays(rkC) < 0;
}
Example #8
0
bool moDMatrix<Real>::operator>= (const moDMatrix& rkM) const
{
    return CompareArrays(rkM) >= 0;
}
bool moQuaternion<Real>::operator!= (const moQuaternion& rkQ) const
{
    return CompareArrays(rkQ) != 0;
}