forked from derickr/quickhash
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Implemented the constructor to initialize the IntSet.
SVN Rev: 505
- Loading branch information
Showing
3 changed files
with
81 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--TEST-- | ||
Basic tests for creating an IntHash | ||
--INI-- | ||
extension=quickhash.so | ||
xdebug.default_enable=0 | ||
--FILE-- | ||
<?php | ||
var_dump( new QuickHashIntSet( 1024 ) ); | ||
var_dump( new QuickHashIntSet( 1024, 1 ) ); | ||
var_dump( new QuickHashIntSet( 1024, QuickHashIntSet::CHECK_FOR_DUPES ) ); | ||
|
||
try | ||
{ | ||
new QuickHashIntSet(); | ||
} | ||
catch ( Exception $e ) | ||
{ | ||
echo $e->getMessage(), "\n"; | ||
} | ||
|
||
try | ||
{ | ||
new QuickHashIntSet( 1024, QuickHashIntSet::CHECK_FOR_DUPES, 4 ); | ||
} | ||
catch ( Exception $e ) | ||
{ | ||
echo $e->getMessage(), "\n"; | ||
} | ||
|
||
try | ||
{ | ||
new QuickHashIntSet( 2 ); | ||
} | ||
catch ( Exception $e ) | ||
{ | ||
echo $e->getMessage(), "\n"; | ||
} | ||
?> | ||
--EXPECT-- | ||
object(QuickHashIntSet)#1 (0) { | ||
} | ||
object(QuickHashIntSet)#1 (0) { | ||
} | ||
object(QuickHashIntSet)#1 (0) { | ||
} | ||
QuickHashIntSet::__construct() expects at least 1 parameter, 0 given | ||
QuickHashIntSet::__construct() expects at most 2 parameters, 3 given | ||
QuickHashIntSet::__construct(): Could not initialize set. |