From 2a8772a98360e8e48ba4a08a2e01d9ed11b47628 Mon Sep 17 00:00:00 2001 From: Brat-vseznamus Date: Wed, 12 Jun 2024 18:40:06 +0300 Subject: [PATCH] test cpp file for example --- internal/tlcodegen/test/gen/test_cpp.cpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/internal/tlcodegen/test/gen/test_cpp.cpp b/internal/tlcodegen/test/gen/test_cpp.cpp index 855fe481..7e8d9f0c 100644 --- a/internal/tlcodegen/test/gen/test_cpp.cpp +++ b/internal/tlcodegen/test/gen/test_cpp.cpp @@ -1,6 +1,5 @@ #include #include "cpp/a.top2.hpp" -#include "cpp/a.top3.hpp" std::string to_hex(const uint8_t *data, size_t count) { static const char hexdigits[] = "0123456789abcdef"; @@ -16,6 +15,8 @@ std::string to_hex(const uint8_t *data, size_t count) { int main() { basictl::tl_ostream_string str; + basictl::tl_ostream_string str2; + tl2::a::Top2 top2; @@ -23,18 +24,8 @@ int main() { auto & buf = str.get_buffer(); std::cout << top2.tl_name() << ": " << to_hex(reinterpret_cast(buf.data()), buf.size()) << std::endl; - tl2::a::Top3 top3; - top3.n = 2; - // top3.a.a = "Hi!"; - top3.c.b.a.a.push_back(5); - top3.c.b.a.a.push_back(7); - - basictl::tl_ostream_string str2; - - top3.write(str2); - - auto & buf2 = str2.get_buffer(); - std::cout << top3.tl_name() << ": " << to_hex(reinterpret_cast(buf2.data()), buf2.size()) << std::endl; +// top3.write(str2); +// std::cout << top3.tl_name() << ": " << to_hex(reinterpret_cast(buf2.data()), buf2.size()) << std::endl; return 0; }