diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-29 13:10:46 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-29 13:10:46 +0100 |
commit | 7b7efa4f80dc5c9d26b59087270a8d89fedcc808 (patch) | |
tree | 1dfb0ce4a6662a5bcb6562b40ab91f813a959afc /tests/cpp/include/variables/004-store-scalar-variables.h | |
parent | c0e1f20eeab6445d6355ea11ef7d264cb37c52cf (diff) | |
parent | 8bd7f5162870e4b39c7629c1a67a3372402406c9 (diff) |
Merge pull request #56 from valmat/tests
New tests
Diffstat (limited to 'tests/cpp/include/variables/004-store-scalar-variables.h')
-rw-r--r-- | tests/cpp/include/variables/004-store-scalar-variables.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/cpp/include/variables/004-store-scalar-variables.h b/tests/cpp/include/variables/004-store-scalar-variables.h new file mode 100644 index 0000000..9ce82e5 --- /dev/null +++ b/tests/cpp/include/variables/004-store-scalar-variables.h @@ -0,0 +1,48 @@ +/** + * + * Test variables + * 004-store-scalar-variables.phpt + * + */ + +/** + * Set up namespace + */ +namespace TestVariables { + + /* + * Test variables defined in PHP-CPP + */ + Php::Value scalar_store(void) { + + Php::Value value1 = 1234; + Php::Value value2 = "this is a string"; + Php::Value value3 = std::string("another string"); + Php::Value value4 = nullptr; + Php::Value value5 = 123.45; + Php::Value value6 = true; + + Php::Value r; + r[0] = value1; + r[1] = value2; + r[2] = value3; + r[3] = value4; + r[4] = value5; + r[5] = value6; + + r[6] = 1234; + r[7] = "this is a string"; + r[8] = std::string("another string"); + r[9] = nullptr; + r[10] = Php::Value(); + r[11] = 123.45; + r[12] = false; + + return r; + } + +/** + * End of namespace + */ +} + |