Created
April 24, 2014 23:58
-
-
Save balazs/11273596 to your computer and use it in GitHub Desktop.
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
diff --git a/Source/wtf/Dummy.cpp b/Source/wtf/Dummy.cpp | |
new file mode 100644 | |
index 0000000..81eb36d | |
--- /dev/null | |
+++ b/Source/wtf/Dummy.cpp | |
@@ -0,0 +1,45 @@ | |
+#include "wtf/RefPtr.h" | |
+#include "wtf/HashMap.h" | |
+#include "wtf/text/String.h" | |
+ | |
+namespace WTF { | |
+ | |
+bool dummy1() | |
+{ | |
+ HashMap<int, void*> m; | |
+ m.add(0, 0); | |
+ return m.contains(1); | |
+} | |
+ | |
+bool dummy2() | |
+{ | |
+ HashMap<String, String*> m; | |
+ m.add(String("a"), new String("a")); | |
+ return m.contains(String("a")); | |
+} | |
+ | |
+#if 0 | |
+struct MyNonPOD { | |
+ virtual ~MyNonPOD(); | |
+ int d; | |
+}; | |
+ | |
+MyNonPOD::~MyNonPOD() | |
+{ | |
+ d = 0; | |
+} | |
+ | |
+struct MyPODHash { | |
+ static unsigned hash(const MyPod& p) { return p.d; } | |
+ static bool equal(const MyPod& a, const MyPod& b) { return a.d == b.d; } | |
+ static const bool safeToCompareEmptyOrDeleted = false; | |
+}; | |
+ | |
+bool dummy3() | |
+{ | |
+ HashMap<int, RefPtr<Dummy> > m; | |
+ m.add(0, adoptPtr()) | |
+} | |
+#endif | |
+ | |
+} | |
diff --git a/Source/wtf/wtf.gypi b/Source/wtf/wtf.gypi | |
index cdbcfdd..cdc2506 100644 | |
--- a/Source/wtf/wtf.gypi | |
+++ b/Source/wtf/wtf.gypi | |
@@ -2,6 +2,7 @@ | |
{ | |
'variables': { | |
'wtf_files': [ | |
+ 'Dummy.cpp', | |
'ASCIICType.h', | |
'Alignment.h', | |
'ArrayBuffer.cpp', |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment