summaryrefslogtreecommitdiff
path: root/tests/cpp/include/variables/005-cast-objects-to-scalars.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/variables/005-cast-objects-to-scalars.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/variables/005-cast-objects-to-scalars.h')
-rw-r--r--tests/cpp/include/variables/005-cast-objects-to-scalars.h75
1 files changed, 0 insertions, 75 deletions
diff --git a/tests/cpp/include/variables/005-cast-objects-to-scalars.h b/tests/cpp/include/variables/005-cast-objects-to-scalars.h
deleted file mode 100644
index f053c4d..0000000
--- a/tests/cpp/include/variables/005-cast-objects-to-scalars.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- *
- * Test variables
- * 005-cast-objects-to-scalars.phpt
- *
- */
-
-
-
-/**
- * Set up namespace
- */
-namespace TestVariables {
-
- /**
- * A sample class, with methods to cast objects to scalars
- */
- class Obj2Scalar : public Php::Base
- {
- public:
- /**
- * C++ constructor and C++ destructpr
- */
- Obj2Scalar() {}
- virtual ~Obj2Scalar() {}
-
- /**
- * Cast to a string
- *
- * Note that now we use const char* as return value, and not Php::Value.
- * The __toString function is detected at compile time, and it does
- * not have a fixed signature. You can return any value that can be picked
- * up by a Php::Value object.
- *
- * @return const char *
- */
- const char *__toString()
- {
- return "Mount Meru, also called Sumeru (Sanskrit)";
- }
-
- /**
- * Cast to a integer
- * @return long
- */
- long __toInteger()
- {
- return 27032014;
- }
-
- /**
- * Cast to a floating point number
- * @return double
- */
- double __toFloat()
- {
- return 3.14159265359;
- }
-
- /**
- * Cast to a boolean
- * @return bool
- */
- bool __toBool()
- {
- return true;
- }
- };
-
-
-/**
- * End of namespace
- */
-}
-