diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-02 23:43:12 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-02 23:43:12 +0800 |
commit | 0823254c3bc2560f8e0dd6f19d05f471f8af94f4 (patch) | |
tree | 56188e6c00336c34971839a90ece54a576483606 /tests/files/TrieTests | |
parent | 4f3f881c9be0b590e6e28fda295257e8d15d5f02 (diff) | |
parent | ce7204fa17560f6a76c7592bf5f23d29f22042d6 (diff) | |
download | go-tangerine-0823254c3bc2560f8e0dd6f19d05f471f8af94f4.tar go-tangerine-0823254c3bc2560f8e0dd6f19d05f471f8af94f4.tar.gz go-tangerine-0823254c3bc2560f8e0dd6f19d05f471f8af94f4.tar.bz2 go-tangerine-0823254c3bc2560f8e0dd6f19d05f471f8af94f4.tar.lz go-tangerine-0823254c3bc2560f8e0dd6f19d05f471f8af94f4.tar.xz go-tangerine-0823254c3bc2560f8e0dd6f19d05f471f8af94f4.tar.zst go-tangerine-0823254c3bc2560f8e0dd6f19d05f471f8af94f4.zip |
Add 'tests/files/' from commit 'ce7204fa17560f6a76c7592bf5f23d29f22042d6'
git-subtree-dir: tests/files
git-subtree-mainline: 4f3f881c9be0b590e6e28fda295257e8d15d5f02
git-subtree-split: ce7204fa17560f6a76c7592bf5f23d29f22042d6
Diffstat (limited to 'tests/files/TrieTests')
-rw-r--r-- | tests/files/TrieTests/trieanyorder.json | 54 | ||||
-rw-r--r-- | tests/files/TrieTests/trieanyorder_secureTrie.json | 54 | ||||
-rw-r--r-- | tests/files/TrieTests/trietest.json | 86 | ||||
-rw-r--r-- | tests/files/TrieTests/trietest_secureTrie.json | 86 | ||||
-rw-r--r-- | tests/files/TrieTests/trietestnextprev.json | 19 |
5 files changed, 299 insertions, 0 deletions
diff --git a/tests/files/TrieTests/trieanyorder.json b/tests/files/TrieTests/trieanyorder.json new file mode 100644 index 000000000..58fcc4f34 --- /dev/null +++ b/tests/files/TrieTests/trieanyorder.json @@ -0,0 +1,54 @@ +{ + "singleItem": { + "in": { + "A": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "root": "0xd23786fb4a010da3ce639d66d5e904a11dbc02746d1ce25029e53290cabf28ab" + }, + "dogs": { + "in": { + "doe": "reindeer", + "dog": "puppy", + "dogglesworth": "cat" + }, + "root": "0x8aad789dff2f538bca5d8ea56e8abe10f4c7ba3a5dea95fea4cd6e7c3a1168d3" + }, + "puppy": { + "in": { + "do": "verb", + "horse": "stallion", + "doge": "coin", + "dog": "puppy" + }, + "root": "0x5991bb8c6514148a29db676a14ac506cd2cd5775ace63c30a4fe457715e9ac84" + }, + "foo": { + "in": { + "foo": "bar", + "food": "bass" + }, + "root": "0x17beaa1648bafa633cda809c90c04af50fc8aed3cb40d16efbddee6fdf63c4c3" + }, + "smallValues": { + "in": { + "be": "e", + "dog": "puppy", + "bed": "d" + }, + "root": "0x3f67c7a47520f79faa29255d2d3c084a7a6df0453116ed7232ff10277a8be68b" + }, + "testy": { + "in": { + "test": "test", + "te": "testy" + }, + "root": "0x8452568af70d8d140f58d941338542f645fcca50094b20f3c3d8c3df49337928" + }, + "hex": { + "in": { + "0x0045": "0x0123456789", + "0x4500": "0x9876543210" + }, + "root": "0x285505fcabe84badc8aa310e2aae17eddc7d120aabec8a476902c8184b3a3503" + } +} diff --git a/tests/files/TrieTests/trieanyorder_secureTrie.json b/tests/files/TrieTests/trieanyorder_secureTrie.json new file mode 100644 index 000000000..a1d9a6961 --- /dev/null +++ b/tests/files/TrieTests/trieanyorder_secureTrie.json @@ -0,0 +1,54 @@ +{ + "singleItem": { + "in": { + "A": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "root": "0xe9e2935138352776cad724d31c9fa5266a5c593bb97726dd2a908fe6d53284df" + }, + "dogs": { + "in": { + "doe": "reindeer", + "dog": "puppy", + "dogglesworth": "cat" + }, + "root": "0xd4cd937e4a4368d7931a9cf51686b7e10abb3dce38a39000fd7902a092b64585" + }, + "puppy": { + "in": { + "do": "verb", + "horse": "stallion", + "doge": "coin", + "dog": "puppy" + }, + "root": "0x29b235a58c3c25ab83010c327d5932bcf05324b7d6b1185e650798034783ca9d" + }, + "foo": { + "in": { + "foo": "bar", + "food": "bass" + }, + "root": "0x1385f23a33021025d9e87cca5c66c00de06178807b96a9acc92b7d651ccde842" + }, + "smallValues": { + "in": { + "be": "e", + "dog": "puppy", + "bed": "d" + }, + "root": "0x826a4f9f9054a3e980e54b20da992c24fa20467f1ca635115ef4917be66e746f" + }, + "testy": { + "in": { + "test": "test", + "te": "testy" + }, + "root": "0xaea54fb6c80499674248a462864c420c9d9f3b3d38c879c12425bade1ad76552" + }, + "hex": { + "in": { + "0x0045": "0x0123456789", + "0x4500": "0x9876543210" + }, + "root": "0xbc11c02c8ab456db0c4d2728b6a2a6210d06f26a2ace4f7d8bdfc72ddf2630ab" + } +} diff --git a/tests/files/TrieTests/trietest.json b/tests/files/TrieTests/trietest.json new file mode 100644 index 000000000..d871a8a81 --- /dev/null +++ b/tests/files/TrieTests/trietest.json @@ -0,0 +1,86 @@ +{ + "emptyValues": { + "in": [ + ["do", "verb"], + ["ether", "wookiedoo"], + ["horse", "stallion"], + ["shaman", "horse"], + ["doge", "coin"], + ["ether", null], + ["dog", "puppy"], + ["shaman", null] + ], + "root": "0x5991bb8c6514148a29db676a14ac506cd2cd5775ace63c30a4fe457715e9ac84" + }, + "branchingTests": { + "in":[ + ["0x04110d816c380812a427968ece99b1c963dfbce6", "something"], + ["0x095e7baea6a6c7c4c2dfeb977efac326af552d87", "something"], + ["0x0a517d755cebbf66312b30fff713666a9cb917e0", "something"], + ["0x24dd378f51adc67a50e339e8031fe9bd4aafab36", "something"], + ["0x293f982d000532a7861ab122bdc4bbfd26bf9030", "something"], + ["0x2cf5732f017b0cf1b1f13a1478e10239716bf6b5", "something"], + ["0x31c640b92c21a1f1465c91070b4b3b4d6854195f", "something"], + ["0x37f998764813b136ddf5a754f34063fd03065e36", "something"], + ["0x37fa399a749c121f8a15ce77e3d9f9bec8020d7a", "something"], + ["0x4f36659fa632310b6ec438dea4085b522a2dd077", "something"], + ["0x62c01474f089b07dae603491675dc5b5748f7049", "something"], + ["0x729af7294be595a0efd7d891c9e51f89c07950c7", "something"], + ["0x83e3e5a16d3b696a0314b30b2534804dd5e11197", "something"], + ["0x8703df2417e0d7c59d063caa9583cb10a4d20532", "something"], + ["0x8dffcd74e5b5923512916c6a64b502689cfa65e1", "something"], + ["0x95a4d7cccb5204733874fa87285a176fe1e9e240", "something"], + ["0x99b2fcba8120bedd048fe79f5262a6690ed38c39", "something"], + ["0xa4202b8b8afd5354e3e40a219bdc17f6001bf2cf", "something"], + ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "something"], + ["0xa9647f4a0a14042d91dc33c0328030a7157c93ae", "something"], + ["0xaa6cffe5185732689c18f37a7f86170cb7304c2a", "something"], + ["0xaae4a2e3c51c04606dcb3723456e58f3ed214f45", "something"], + ["0xc37a43e940dfb5baf581a0b82b351d48305fc885", "something"], + ["0xd2571607e241ecf590ed94b12d87c94babe36db6", "something"], + ["0xf735071cbee190d76b704ce68384fc21e389fbe7", "something"], + ["0x04110d816c380812a427968ece99b1c963dfbce6", null], + ["0x095e7baea6a6c7c4c2dfeb977efac326af552d87", null], + ["0x0a517d755cebbf66312b30fff713666a9cb917e0", null], + ["0x24dd378f51adc67a50e339e8031fe9bd4aafab36", null], + ["0x293f982d000532a7861ab122bdc4bbfd26bf9030", null], + ["0x2cf5732f017b0cf1b1f13a1478e10239716bf6b5", null], + ["0x31c640b92c21a1f1465c91070b4b3b4d6854195f", null], + ["0x37f998764813b136ddf5a754f34063fd03065e36", null], + ["0x37fa399a749c121f8a15ce77e3d9f9bec8020d7a", null], + ["0x4f36659fa632310b6ec438dea4085b522a2dd077", null], + ["0x62c01474f089b07dae603491675dc5b5748f7049", null], + ["0x729af7294be595a0efd7d891c9e51f89c07950c7", null], + ["0x83e3e5a16d3b696a0314b30b2534804dd5e11197", null], + ["0x8703df2417e0d7c59d063caa9583cb10a4d20532", null], + ["0x8dffcd74e5b5923512916c6a64b502689cfa65e1", null], + ["0x95a4d7cccb5204733874fa87285a176fe1e9e240", null], + ["0x99b2fcba8120bedd048fe79f5262a6690ed38c39", null], + ["0xa4202b8b8afd5354e3e40a219bdc17f6001bf2cf", null], + ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", null], + ["0xa9647f4a0a14042d91dc33c0328030a7157c93ae", null], + ["0xaa6cffe5185732689c18f37a7f86170cb7304c2a", null], + ["0xaae4a2e3c51c04606dcb3723456e58f3ed214f45", null], + ["0xc37a43e940dfb5baf581a0b82b351d48305fc885", null], + ["0xd2571607e241ecf590ed94b12d87c94babe36db6", null], + ["0xf735071cbee190d76b704ce68384fc21e389fbe7", null] + ], + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421" + }, + "jeff": { + "in": [ + ["0x0000000000000000000000000000000000000000000000000000000000000045", "0x22b224a1420a802ab51d326e29fa98e34c4f24ea"], + ["0x0000000000000000000000000000000000000000000000000000000000000046", "0x67706c2076330000000000000000000000000000000000000000000000000000"], + ["0x0000000000000000000000000000000000000000000000000000001234567890", "0x697c7b8c961b56f675d570498424ac8de1a918f6"], + ["0x000000000000000000000000697c7b8c961b56f675d570498424ac8de1a918f6", "0x1234567890"], + ["0x0000000000000000000000007ef9e639e2733cb34e4dfc576d4b23f72db776b2", "0x4655474156000000000000000000000000000000000000000000000000000000"], + ["0x000000000000000000000000ec4f34c97e43fbb2816cfd95e388353c7181dab1", "0x4e616d6552656700000000000000000000000000000000000000000000000000"], + ["0x4655474156000000000000000000000000000000000000000000000000000000", "0x7ef9e639e2733cb34e4dfc576d4b23f72db776b2"], + ["0x4e616d6552656700000000000000000000000000000000000000000000000000", "0xec4f34c97e43fbb2816cfd95e388353c7181dab1"], + ["0x0000000000000000000000000000000000000000000000000000001234567890", null], + ["0x000000000000000000000000697c7b8c961b56f675d570498424ac8de1a918f6", "0x6f6f6f6820736f2067726561742c207265616c6c6c793f000000000000000000"], + ["0x6f6f6f6820736f2067726561742c207265616c6c6c793f000000000000000000", "0x697c7b8c961b56f675d570498424ac8de1a918f6"] + ], + "root": "0x9f6221ebb8efe7cff60a716ecb886e67dd042014be444669f0159d8e68b42100" + } +} diff --git a/tests/files/TrieTests/trietest_secureTrie.json b/tests/files/TrieTests/trietest_secureTrie.json new file mode 100644 index 000000000..ac4ecd2dd --- /dev/null +++ b/tests/files/TrieTests/trietest_secureTrie.json @@ -0,0 +1,86 @@ +{ + "emptyValues": { + "in": [ + ["do", "verb"], + ["ether", "wookiedoo"], + ["horse", "stallion"], + ["shaman", "horse"], + ["doge", "coin"], + ["ether", null], + ["dog", "puppy"], + ["shaman", null] + ], + "root": "0x29b235a58c3c25ab83010c327d5932bcf05324b7d6b1185e650798034783ca9d" + }, + "branchingTests": { + "in":[ + ["0x04110d816c380812a427968ece99b1c963dfbce6", "something"], + ["0x095e7baea6a6c7c4c2dfeb977efac326af552d87", "something"], + ["0x0a517d755cebbf66312b30fff713666a9cb917e0", "something"], + ["0x24dd378f51adc67a50e339e8031fe9bd4aafab36", "something"], + ["0x293f982d000532a7861ab122bdc4bbfd26bf9030", "something"], + ["0x2cf5732f017b0cf1b1f13a1478e10239716bf6b5", "something"], + ["0x31c640b92c21a1f1465c91070b4b3b4d6854195f", "something"], + ["0x37f998764813b136ddf5a754f34063fd03065e36", "something"], + ["0x37fa399a749c121f8a15ce77e3d9f9bec8020d7a", "something"], + ["0x4f36659fa632310b6ec438dea4085b522a2dd077", "something"], + ["0x62c01474f089b07dae603491675dc5b5748f7049", "something"], + ["0x729af7294be595a0efd7d891c9e51f89c07950c7", "something"], + ["0x83e3e5a16d3b696a0314b30b2534804dd5e11197", "something"], + ["0x8703df2417e0d7c59d063caa9583cb10a4d20532", "something"], + ["0x8dffcd74e5b5923512916c6a64b502689cfa65e1", "something"], + ["0x95a4d7cccb5204733874fa87285a176fe1e9e240", "something"], + ["0x99b2fcba8120bedd048fe79f5262a6690ed38c39", "something"], + ["0xa4202b8b8afd5354e3e40a219bdc17f6001bf2cf", "something"], + ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "something"], + ["0xa9647f4a0a14042d91dc33c0328030a7157c93ae", "something"], + ["0xaa6cffe5185732689c18f37a7f86170cb7304c2a", "something"], + ["0xaae4a2e3c51c04606dcb3723456e58f3ed214f45", "something"], + ["0xc37a43e940dfb5baf581a0b82b351d48305fc885", "something"], + ["0xd2571607e241ecf590ed94b12d87c94babe36db6", "something"], + ["0xf735071cbee190d76b704ce68384fc21e389fbe7", "something"], + ["0x04110d816c380812a427968ece99b1c963dfbce6", null], + ["0x095e7baea6a6c7c4c2dfeb977efac326af552d87", null], + ["0x0a517d755cebbf66312b30fff713666a9cb917e0", null], + ["0x24dd378f51adc67a50e339e8031fe9bd4aafab36", null], + ["0x293f982d000532a7861ab122bdc4bbfd26bf9030", null], + ["0x2cf5732f017b0cf1b1f13a1478e10239716bf6b5", null], + ["0x31c640b92c21a1f1465c91070b4b3b4d6854195f", null], + ["0x37f998764813b136ddf5a754f34063fd03065e36", null], + ["0x37fa399a749c121f8a15ce77e3d9f9bec8020d7a", null], + ["0x4f36659fa632310b6ec438dea4085b522a2dd077", null], + ["0x62c01474f089b07dae603491675dc5b5748f7049", null], + ["0x729af7294be595a0efd7d891c9e51f89c07950c7", null], + ["0x83e3e5a16d3b696a0314b30b2534804dd5e11197", null], + ["0x8703df2417e0d7c59d063caa9583cb10a4d20532", null], + ["0x8dffcd74e5b5923512916c6a64b502689cfa65e1", null], + ["0x95a4d7cccb5204733874fa87285a176fe1e9e240", null], + ["0x99b2fcba8120bedd048fe79f5262a6690ed38c39", null], + ["0xa4202b8b8afd5354e3e40a219bdc17f6001bf2cf", null], + ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", null], + ["0xa9647f4a0a14042d91dc33c0328030a7157c93ae", null], + ["0xaa6cffe5185732689c18f37a7f86170cb7304c2a", null], + ["0xaae4a2e3c51c04606dcb3723456e58f3ed214f45", null], + ["0xc37a43e940dfb5baf581a0b82b351d48305fc885", null], + ["0xd2571607e241ecf590ed94b12d87c94babe36db6", null], + ["0xf735071cbee190d76b704ce68384fc21e389fbe7", null] + ], + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421" + }, + "jeff": { + "in": [ + ["0x0000000000000000000000000000000000000000000000000000000000000045", "0x22b224a1420a802ab51d326e29fa98e34c4f24ea"], + ["0x0000000000000000000000000000000000000000000000000000000000000046", "0x67706c2076330000000000000000000000000000000000000000000000000000"], + ["0x0000000000000000000000000000000000000000000000000000001234567890", "0x697c7b8c961b56f675d570498424ac8de1a918f6"], + ["0x000000000000000000000000697c7b8c961b56f675d570498424ac8de1a918f6", "0x1234567890"], + ["0x0000000000000000000000007ef9e639e2733cb34e4dfc576d4b23f72db776b2", "0x4655474156000000000000000000000000000000000000000000000000000000"], + ["0x000000000000000000000000ec4f34c97e43fbb2816cfd95e388353c7181dab1", "0x4e616d6552656700000000000000000000000000000000000000000000000000"], + ["0x4655474156000000000000000000000000000000000000000000000000000000", "0x7ef9e639e2733cb34e4dfc576d4b23f72db776b2"], + ["0x4e616d6552656700000000000000000000000000000000000000000000000000", "0xec4f34c97e43fbb2816cfd95e388353c7181dab1"], + ["0x0000000000000000000000000000000000000000000000000000001234567890", null], + ["0x000000000000000000000000697c7b8c961b56f675d570498424ac8de1a918f6", "0x6f6f6f6820736f2067726561742c207265616c6c6c793f000000000000000000"], + ["0x6f6f6f6820736f2067726561742c207265616c6c6c793f000000000000000000", "0x697c7b8c961b56f675d570498424ac8de1a918f6"] + ], + "root": "0x72adb52e9d9428f808e3e8045be18d3baa77881d0cfab89a17a2bcbacee2f320" + } +} diff --git a/tests/files/TrieTests/trietestnextprev.json b/tests/files/TrieTests/trietestnextprev.json new file mode 100644 index 000000000..f2ad924e3 --- /dev/null +++ b/tests/files/TrieTests/trietestnextprev.json @@ -0,0 +1,19 @@ +{ + "basic": { + "in": [ "cat", "doge", "wallace" ], + "tests": [ + [ "", "", "cat" ], + [ "bobo", "", "cat" ], + [ "c", "", "cat" ], + [ "car", "", "cat" ], + [ "cat", "", "doge" ], + [ "catering", "cat", "doge" ], + [ "d", "cat", "doge" ], + [ "doge", "cat", "wallace" ], + [ "dogerton", "doge", "wallace" ], + [ "w", "doge", "wallace" ], + [ "wallace", "doge", "" ], + [ "wallace123", "wallace", ""] + ] + } +} |