From 49e05b111dfa58a1e7c88368ef8a20e06afe40ae Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Fri, 15 Jul 2022 13:58:53 -0500 Subject: [PATCH] Remove KV related changes as not currently supported in mandel. --- .../toolchain/abigen-pass/using_std_array.abi | 1 - tests/unit/test_contracts/array_tests.cpp | 41 +------------------ 2 files changed, 1 insertion(+), 41 deletions(-) diff --git a/tests/toolchain/abigen-pass/using_std_array.abi b/tests/toolchain/abigen-pass/using_std_array.abi index 6c75d02d..4019ff00 100644 --- a/tests/toolchain/abigen-pass/using_std_array.abi +++ b/tests/toolchain/abigen-pass/using_std_array.abi @@ -44,7 +44,6 @@ "key_types": [] } ], - "kv_tables": {}, "ricardian_clauses": [], "variants": [], "action_results": [] diff --git a/tests/unit/test_contracts/array_tests.cpp b/tests/unit/test_contracts/array_tests.cpp index a5e85e69..bbd72050 100644 --- a/tests/unit/test_contracts/array_tests.cpp +++ b/tests/unit/test_contracts/array_tests.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include using namespace eosio; @@ -31,45 +31,6 @@ class [[eosio::contract]] array_tests : public contract { } }; - struct [[eosio::table]] my_table_array : eosio::kv::table { - KV_NAMED_INDEX("id"_n, id) - - my_table_array(eosio::name contract_name) { - init(contract_name, id); - } - }; - my_struct s1; - my_struct s2; - // test nested std::array used in kv talbe - [[eosio::action]] - void testkv() { - my_table_array tarr{get_self()}; - - s1.id = 1; - s1.aastr[0] = {"abc","bcd","cde", "def"}; - s1.aastr[1] = {"hij","ijk","jkl", "klm"}; - s2.id = 2, - s2.aastr[0] = {"opq","pqr","qrs", "rst"}; - s2.aastr[1] = {"uvw","vwx","wxy", "xyz"}; - - tarr.put(s1, get_self()); - tarr.put(s2, get_self()); - auto itarr = tarr.id.begin(); - auto itarr_e = tarr.id.end(); - eosio::cout << "print table:: \n"; - while(itarr != itarr_e){ - auto row = itarr.value(); - eosio::cout << "id=" << row.id << "\n"; - for(int i = 0; i < row.aastr.size(); ++i) { - for(int j = 0; j < row.aastr[i].size(); ++j){ - eosio::cout << row.aastr[i][j] << " "; - } - eosio::cout << "\n"; - } - ++itarr; - } - } - // test inside using std::array [[eosio::action]] void testin(std::string message) {