Skip to content

moar #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 19, 2014
Merged

moar #10

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions Zend/zend_hash_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class zend_hash_test : public testing::Test {
HashTable test;
};

TEST(zend_hash_test, supporting) {
TEST_F(zend_hash_test, supporting) {
EXPECT_EQ(zend_inline_hash_func("l", 1), zend_inline_hash_func("l", 1));
EXPECT_EQ(zend_inline_hash_func("lo", 2), zend_inline_hash_func("lo", 2));
EXPECT_EQ(zend_inline_hash_func("lon", 3), zend_inline_hash_func("lon", 3));
Expand All @@ -37,6 +37,14 @@ TEST(zend_hash_test, supporting) {
EXPECT_EQ(zend_inline_hash_func("longertestingthis", 17), zend_inline_hash_func("longertestingthis", 17));
}

TEST(zend_hash_test, basic) {
TEST_F(zend_hash_test, basic) {
int dummy = 1;
int *ptr = NULL;

EXPECT_EQ(zend_hash_next_index_insert(&test, (void**) &dummy, sizeof(int), NULL), SUCCESS);
EXPECT_EQ(zend_hash_num_elements(&test), 1);
EXPECT_EQ(zend_hash_index_find(&test, 0, (void**) &ptr), SUCCESS);
EXPECT_EQ(*ptr, 1);
zend_hash_clean(&test);
EXPECT_EQ(zend_hash_num_elements(&test), 0);
}
2 changes: 1 addition & 1 deletion ext/standard/var_unserializer.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Generated by re2c 0.13.5 on Fri Apr 18 15:07:27 2014 */
/* Generated by re2c 0.13.5 */
#line 1 "ext/standard/var_unserializer.re"
/*
+----------------------------------------------------------------------+
Expand Down