Skip to content

Commit

Permalink
Fix usage of strlen in vm tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dbussink committed Oct 8, 2011
1 parent 33aa58d commit 348136d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vm/test/test_symboltable.hpp
Expand Up @@ -6,6 +6,7 @@

#include <algorithm>
#include <vector>
#include <string.h>

class TestSymbolTable : public CxxTest::TestSuite, public VMTest {
public:
Expand Down Expand Up @@ -73,8 +74,8 @@ class TestSymbolTable : public CxxTest::TestSuite, public VMTest {
const char* str = "__uint_fast64_t";
const char* str2 = "TkIF_MOD";

TS_ASSERT_EQUALS(String::hash_str((unsigned char*)str, std::strlen(str)),
String::hash_str((unsigned char*)str2, std::strlen(str2)));
TS_ASSERT_EQUALS(String::hash_str((unsigned char*)str, strlen(str)),
String::hash_str((unsigned char*)str2, strlen(str2)));

sym = symbols->lookup(state, std::string(str));
sym2 = symbols->lookup(state, std::string(str2));
Expand Down

0 comments on commit 348136d

Please sign in to comment.