summaryrefslogtreecommitdiff
path: root/tests/cpp/include/class_obj/003-comparable.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-11-05 10:25:57 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-11-05 10:25:57 +0100
commitaec191bc6cbb83884466800a750ecad0b37e254f (patch)
treef52fe2b9551056580c5c519fb78a3c5600e1034a /tests/cpp/include/class_obj/003-comparable.h
parentaf530282f530580c1ed7bc184df0a727068275e1 (diff)
remove test framework, it never works, most of the bugs found by the test framework turn out to be caused by errors in the tests instead of errors in the real code, people complain about it all the time, and basically this whole test framework causes more problems than it solves, solves issue #215 and solves issue #221
Diffstat (limited to 'tests/cpp/include/class_obj/003-comparable.h')
-rw-r--r--tests/cpp/include/class_obj/003-comparable.h74
1 files changed, 0 insertions, 74 deletions
diff --git a/tests/cpp/include/class_obj/003-comparable.h b/tests/cpp/include/class_obj/003-comparable.h
deleted file mode 100644
index 8a384dc..0000000
--- a/tests/cpp/include/class_obj/003-comparable.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- *
- * Test Classes and objects
- * 003-comparable.phpt
- *
- */
-
-
-
-
-/**
- * Set up namespace
- */
-namespace TestBaseClass {
-
-
- /**
- * Test custom comparison operator
- */
- class Comparable : public Php::Base
- {
- private:
- /**
- * Internal value of the class
- * @var int
- */
- static int count;
- int _nom;
- int _value;
-
- public:
- /**
- * C++ constructor
- */
- Comparable()
- {
- // start with random value
- //_value = rand();
- _nom = ++count;
- _value = _nom%2+1;
- }
-
- /**
- * C++ destructor
- */
- virtual ~Comparable() {}
-
- /**
- * Cast the object to a string
- * @return std::string
- */
- std::string __toString()
- {
- return "Obj#" + std::to_string(_nom) + "(" + std::to_string(_value) + ")";
- }
-
- /**
- * Compare with a different object
- * @param that
- * @return int
- */
- int __compare(const Comparable &that) const
- {
- return _value - that._value;
- }
- };
- int Comparable::count = 0;
-
-
-/**
- * End of namespace
- */
-}
-