From cd476fa756dd756e611f18629333acc838ee95e5 Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Wed, 25 Oct 2023 21:56:04 +0700
Subject: [PATCH 01/21] [*] Moved from cellframe-sdk test-framework and cmake
 file to determine operating system.

---
 cmake/OS_Detection.cmake                      |  231 +++
 test-framework/.gitignore                     |    1 +
 test-framework/.travis.yml                    |   17 +
 test-framework/CMakeLists.txt                 |    9 +
 test-framework/README.md                      |    3 +
 test-framework/dap_test.c                     |  112 ++
 test-framework/dap_test.h                     |  113 ++
 test-framework/dap_test_generator.c           |   21 +
 test-framework/dap_test_generator.h           |    7 +
 test-framework/docs/CMakeLists_8txt.html      |  120 ++
 test-framework/docs/README_8md.html           |   95 ++
 test-framework/docs/arrowdown.png             |  Bin 0 -> 246 bytes
 test-framework/docs/arrowright.png            |  Bin 0 -> 229 bytes
 test-framework/docs/bc_s.png                  |  Bin 0 -> 676 bytes
 test-framework/docs/bdwn.png                  |  Bin 0 -> 147 bytes
 test-framework/docs/closed.png                |  Bin 0 -> 132 bytes
 test-framework/docs/dap__test_8c.html         |  205 +++
 test-framework/docs/dap__test_8c__incl.dot    |   21 +
 test-framework/docs/dap__test_8c__incl.md5    |    1 +
 test-framework/docs/dap__test_8h.html         |  427 +++++
 .../docs/dap__test_8h__dep__incl.dot          |    8 +
 .../docs/dap__test_8h__dep__incl.md5          |    1 +
 test-framework/docs/dap__test_8h__incl.dot    |   18 +
 test-framework/docs/dap__test_8h__incl.md5    |    1 +
 test-framework/docs/dap__test_8h_source.html  |   96 ++
 .../docs/dap__test__generator_8c.html         |  155 ++
 .../docs/dap__test__generator_8c__incl.dot    |   14 +
 .../docs/dap__test__generator_8c__incl.md5    |    1 +
 .../docs/dap__test__generator_8h.html         |  165 ++
 .../dap__test__generator_8h__dep__incl.dot    |    8 +
 .../dap__test__generator_8h__dep__incl.md5    |    1 +
 .../docs/dap__test__generator_8h__incl.dot    |   12 +
 .../docs/dap__test__generator_8h__incl.md5    |    1 +
 .../docs/dap__test__generator_8h_source.html  |   96 ++
 test-framework/docs/doc.png                   |  Bin 0 -> 746 bytes
 test-framework/docs/doxygen.css               | 1475 +++++++++++++++++
 test-framework/docs/doxygen.png               |  Bin 0 -> 3779 bytes
 test-framework/docs/dynsections.js            |   97 ++
 test-framework/docs/files.html                |  103 ++
 test-framework/docs/folderclosed.png          |  Bin 0 -> 616 bytes
 test-framework/docs/folderopen.png            |  Bin 0 -> 597 bytes
 test-framework/docs/globals.html              |  159 ++
 test-framework/docs/globals_defs.html         |  145 ++
 test-framework/docs/globals_func.html         |  114 ++
 test-framework/docs/graph_legend.dot          |   22 +
 test-framework/docs/graph_legend.html         |  118 ++
 test-framework/docs/graph_legend.md5          |    1 +
 test-framework/docs/index.html                |   89 +
 test-framework/docs/jquery.js                 |   68 +
 ...DemLabs_libdap_MVL_libdap-test_README.html |   90 +
 test-framework/docs/nav_f.png                 |  Bin 0 -> 153 bytes
 test-framework/docs/nav_g.png                 |  Bin 0 -> 95 bytes
 test-framework/docs/nav_h.png                 |  Bin 0 -> 98 bytes
 test-framework/docs/open.png                  |  Bin 0 -> 123 bytes
 test-framework/docs/pages.html                |   94 ++
 test-framework/docs/search/all_0.html         |   26 +
 test-framework/docs/search/all_0.js           |    4 +
 test-framework/docs/search/all_1.html         |   26 +
 test-framework/docs/search/all_1.js           |    5 +
 test-framework/docs/search/all_2.html         |   26 +
 test-framework/docs/search/all_2.js           |   14 +
 test-framework/docs/search/all_3.html         |   26 +
 test-framework/docs/search/all_3.js           |    4 +
 test-framework/docs/search/all_4.html         |   26 +
 test-framework/docs/search/all_4.js           |    4 +
 test-framework/docs/search/all_5.html         |   26 +
 test-framework/docs/search/all_5.js           |    4 +
 test-framework/docs/search/all_6.html         |   26 +
 test-framework/docs/search/all_6.js           |    4 +
 test-framework/docs/search/all_7.html         |   26 +
 test-framework/docs/search/all_7.js           |   11 +
 test-framework/docs/search/close.png          |  Bin 0 -> 273 bytes
 test-framework/docs/search/defines_0.html     |   26 +
 test-framework/docs/search/defines_0.js       |    9 +
 test-framework/docs/search/defines_1.html     |   26 +
 test-framework/docs/search/defines_1.js       |    4 +
 test-framework/docs/search/defines_2.html     |   26 +
 test-framework/docs/search/defines_2.js       |   11 +
 test-framework/docs/search/files_0.html       |   26 +
 test-framework/docs/search/files_0.js         |    4 +
 test-framework/docs/search/files_1.html       |   26 +
 test-framework/docs/search/files_1.js         |    7 +
 test-framework/docs/search/files_2.html       |   26 +
 test-framework/docs/search/files_2.js         |    4 +
 test-framework/docs/search/functions_0.html   |   26 +
 test-framework/docs/search/functions_0.js     |    4 +
 test-framework/docs/search/functions_1.html   |   26 +
 test-framework/docs/search/functions_1.js     |    4 +
 test-framework/docs/search/functions_2.html   |   26 +
 test-framework/docs/search/functions_2.js     |    4 +
 test-framework/docs/search/functions_3.html   |   26 +
 test-framework/docs/search/functions_3.js     |    4 +
 test-framework/docs/search/mag_sel.png        |  Bin 0 -> 563 bytes
 test-framework/docs/search/nomatches.html     |   12 +
 test-framework/docs/search/pages_0.html       |   26 +
 test-framework/docs/search/pages_0.js         |    4 +
 test-framework/docs/search/search.css         |  271 +++
 test-framework/docs/search/search.js          |  791 +++++++++
 test-framework/docs/search/search_l.png       |  Bin 0 -> 604 bytes
 test-framework/docs/search/search_m.png       |  Bin 0 -> 158 bytes
 test-framework/docs/search/search_r.png       |  Bin 0 -> 612 bytes
 test-framework/docs/search/searchdata.js      |   27 +
 test-framework/docs/splitbar.png              |  Bin 0 -> 314 bytes
 test-framework/docs/sync_off.png              |  Bin 0 -> 853 bytes
 test-framework/docs/sync_on.png               |  Bin 0 -> 845 bytes
 test-framework/docs/tab_a.png                 |  Bin 0 -> 142 bytes
 test-framework/docs/tab_b.png                 |  Bin 0 -> 169 bytes
 test-framework/docs/tab_h.png                 |  Bin 0 -> 177 bytes
 test-framework/docs/tab_s.png                 |  Bin 0 -> 184 bytes
 test-framework/docs/tabs.css                  |   60 +
 110 files changed, 6299 insertions(+)
 create mode 100644 cmake/OS_Detection.cmake
 create mode 100644 test-framework/.gitignore
 create mode 100644 test-framework/.travis.yml
 create mode 100644 test-framework/CMakeLists.txt
 create mode 100644 test-framework/README.md
 create mode 100644 test-framework/dap_test.c
 create mode 100755 test-framework/dap_test.h
 create mode 100644 test-framework/dap_test_generator.c
 create mode 100755 test-framework/dap_test_generator.h
 create mode 100644 test-framework/docs/CMakeLists_8txt.html
 create mode 100644 test-framework/docs/README_8md.html
 create mode 100644 test-framework/docs/arrowdown.png
 create mode 100644 test-framework/docs/arrowright.png
 create mode 100644 test-framework/docs/bc_s.png
 create mode 100644 test-framework/docs/bdwn.png
 create mode 100644 test-framework/docs/closed.png
 create mode 100644 test-framework/docs/dap__test_8c.html
 create mode 100644 test-framework/docs/dap__test_8c__incl.dot
 create mode 100644 test-framework/docs/dap__test_8c__incl.md5
 create mode 100644 test-framework/docs/dap__test_8h.html
 create mode 100644 test-framework/docs/dap__test_8h__dep__incl.dot
 create mode 100644 test-framework/docs/dap__test_8h__dep__incl.md5
 create mode 100644 test-framework/docs/dap__test_8h__incl.dot
 create mode 100644 test-framework/docs/dap__test_8h__incl.md5
 create mode 100644 test-framework/docs/dap__test_8h_source.html
 create mode 100644 test-framework/docs/dap__test__generator_8c.html
 create mode 100644 test-framework/docs/dap__test__generator_8c__incl.dot
 create mode 100644 test-framework/docs/dap__test__generator_8c__incl.md5
 create mode 100644 test-framework/docs/dap__test__generator_8h.html
 create mode 100644 test-framework/docs/dap__test__generator_8h__dep__incl.dot
 create mode 100644 test-framework/docs/dap__test__generator_8h__dep__incl.md5
 create mode 100644 test-framework/docs/dap__test__generator_8h__incl.dot
 create mode 100644 test-framework/docs/dap__test__generator_8h__incl.md5
 create mode 100644 test-framework/docs/dap__test__generator_8h_source.html
 create mode 100644 test-framework/docs/doc.png
 create mode 100644 test-framework/docs/doxygen.css
 create mode 100644 test-framework/docs/doxygen.png
 create mode 100644 test-framework/docs/dynsections.js
 create mode 100644 test-framework/docs/files.html
 create mode 100644 test-framework/docs/folderclosed.png
 create mode 100644 test-framework/docs/folderopen.png
 create mode 100644 test-framework/docs/globals.html
 create mode 100644 test-framework/docs/globals_defs.html
 create mode 100644 test-framework/docs/globals_func.html
 create mode 100644 test-framework/docs/graph_legend.dot
 create mode 100644 test-framework/docs/graph_legend.html
 create mode 100644 test-framework/docs/graph_legend.md5
 create mode 100644 test-framework/docs/index.html
 create mode 100644 test-framework/docs/jquery.js
 create mode 100644 test-framework/docs/md__home_blus_DemLabs_libdap_MVL_libdap-test_README.html
 create mode 100644 test-framework/docs/nav_f.png
 create mode 100644 test-framework/docs/nav_g.png
 create mode 100644 test-framework/docs/nav_h.png
 create mode 100644 test-framework/docs/open.png
 create mode 100644 test-framework/docs/pages.html
 create mode 100644 test-framework/docs/search/all_0.html
 create mode 100644 test-framework/docs/search/all_0.js
 create mode 100644 test-framework/docs/search/all_1.html
 create mode 100644 test-framework/docs/search/all_1.js
 create mode 100644 test-framework/docs/search/all_2.html
 create mode 100644 test-framework/docs/search/all_2.js
 create mode 100644 test-framework/docs/search/all_3.html
 create mode 100644 test-framework/docs/search/all_3.js
 create mode 100644 test-framework/docs/search/all_4.html
 create mode 100644 test-framework/docs/search/all_4.js
 create mode 100644 test-framework/docs/search/all_5.html
 create mode 100644 test-framework/docs/search/all_5.js
 create mode 100644 test-framework/docs/search/all_6.html
 create mode 100644 test-framework/docs/search/all_6.js
 create mode 100644 test-framework/docs/search/all_7.html
 create mode 100644 test-framework/docs/search/all_7.js
 create mode 100644 test-framework/docs/search/close.png
 create mode 100644 test-framework/docs/search/defines_0.html
 create mode 100644 test-framework/docs/search/defines_0.js
 create mode 100644 test-framework/docs/search/defines_1.html
 create mode 100644 test-framework/docs/search/defines_1.js
 create mode 100644 test-framework/docs/search/defines_2.html
 create mode 100644 test-framework/docs/search/defines_2.js
 create mode 100644 test-framework/docs/search/files_0.html
 create mode 100644 test-framework/docs/search/files_0.js
 create mode 100644 test-framework/docs/search/files_1.html
 create mode 100644 test-framework/docs/search/files_1.js
 create mode 100644 test-framework/docs/search/files_2.html
 create mode 100644 test-framework/docs/search/files_2.js
 create mode 100644 test-framework/docs/search/functions_0.html
 create mode 100644 test-framework/docs/search/functions_0.js
 create mode 100644 test-framework/docs/search/functions_1.html
 create mode 100644 test-framework/docs/search/functions_1.js
 create mode 100644 test-framework/docs/search/functions_2.html
 create mode 100644 test-framework/docs/search/functions_2.js
 create mode 100644 test-framework/docs/search/functions_3.html
 create mode 100644 test-framework/docs/search/functions_3.js
 create mode 100644 test-framework/docs/search/mag_sel.png
 create mode 100644 test-framework/docs/search/nomatches.html
 create mode 100644 test-framework/docs/search/pages_0.html
 create mode 100644 test-framework/docs/search/pages_0.js
 create mode 100644 test-framework/docs/search/search.css
 create mode 100644 test-framework/docs/search/search.js
 create mode 100644 test-framework/docs/search/search_l.png
 create mode 100644 test-framework/docs/search/search_m.png
 create mode 100644 test-framework/docs/search/search_r.png
 create mode 100644 test-framework/docs/search/searchdata.js
 create mode 100644 test-framework/docs/splitbar.png
 create mode 100644 test-framework/docs/sync_off.png
 create mode 100644 test-framework/docs/sync_on.png
 create mode 100644 test-framework/docs/tab_a.png
 create mode 100644 test-framework/docs/tab_b.png
 create mode 100644 test-framework/docs/tab_h.png
 create mode 100644 test-framework/docs/tab_s.png
 create mode 100644 test-framework/docs/tabs.css

diff --git a/cmake/OS_Detection.cmake b/cmake/OS_Detection.cmake
new file mode 100644
index 000000000..ce71fbfdf
--- /dev/null
+++ b/cmake/OS_Detection.cmake
@@ -0,0 +1,231 @@
+include_guard(GLOBAL)
+
+if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+    set(OS_TYPE_DESKTOP ON)
+    set(LINUX ON)
+    set(UNIX ON)
+    EXECUTE_PROCESS( COMMAND cat /etc/os-release COMMAND grep VERSION_CODENAME COMMAND sed s/VERSION_CODENAME=// COMMAND tr -d '\n' OUTPUT_VARIABLE L_DEBIAN_OS_NAME)
+    EXECUTE_PROCESS( COMMAND cat /etc/os-release COMMAND grep VERSION_ID COMMAND sed s/VERSION_ID=// COMMAND tr -d '\n' COMMAND sed s/\\x22// COMMAND sed s/\\x22// OUTPUT_VARIABLE L_DEBIAN_OS_VERSION)
+    SET(DEBIAN_OS_NAME "${L_DEBIAN_OS_NAME}")
+    SET(DEBIAN_OS_VERSION ${L_DEBIAN_OS_VERSION})
+    message("[ ] Debian OS ${DEBIAN_OS_VERSION} (${DEBIAN_OS_NAME})")
+# check if we're building natively on Android (TERMUX)
+    EXECUTE_PROCESS( COMMAND uname -o COMMAND tr -d '\n' OUTPUT_VARIABLE OPERATING_SYSTEM)
+    
+    execute_process (
+                    COMMAND bash -c "awk -F= '/^ID=/{print $2}' /etc/os-release |tr -d '\n' | tr -d '\"'"
+                    OUTPUT_VARIABLE DEBIAN_OS_RELEASE_NAME
+    )
+    
+elseif(${CMAKE_SYSTEM_NAME} MATCHES "Android")
+    set(ANDROID ON)
+    set(UNIX ON)
+    set(LINUX OFF)
+    set(OS_TYPE_MOBILE ON)
+    message("[*] ANDROID build")
+    add_definitions(-DANDROID -DDAP_OS_ANDROID)
+elseif(${CMAKE_SYSTEM_NAME} MATCHES "Win")
+    set(OS_TYPE_DESKTOP ON)
+endif()
+
+if((CMAKE_BUILD_TYPE STREQUAL "Debug") OR (DAP_DEBUG))
+    message("[!] Debug build")
+    SET(DAP_DEBUG ON)
+else()
+    message("[!] Release build")
+    SET(DAP_RELEASE ON)
+    if((CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))
+        message("[!] Debug symbols ON")
+        SET(DAP_DBG_INFO ON)
+    endif()
+endif()
+
+if(CMAKE_SIZEOF_VOID_P EQUAL "8")
+  set(DEFAULT_BUILD_64 ON)
+else()
+  set(DEFAULT_BUILD_64 OFF)
+endif()
+option(BUILD_64 "Build for 64-bit? 'OFF' builds for 32-bit." ${DEFAULT_BUILD_64})
+
+if(BUILD_64)
+  set(ARCH_WIDTH "64")
+else()
+  set(ARCH_WIDTH "32")
+endif()
+message(STATUS "[*] Building for a ${ARCH_WIDTH}-bit system")
+
+if(UNIX)
+    add_definitions ("-DDAP_OS_UNIX")
+    if (APPLE)
+        
+        EXECUTE_PROCESS( COMMAND whoami COMMAND tr -d '\n' OUTPUT_VARIABLE L_USER)
+        EXECUTE_PROCESS( COMMAND echo -n /Users/${L_USER} OUTPUT_VARIABLE L_USERDIR_PATH)
+        set (USERDIR_PATH "${L_USERDIR_PATH}")
+        add_definitions ("-DDAP_OS_DARWIN -DDARWIN -DDAP_OS_BSD")
+        set(DARWIN ON)
+        set(BSD ON)
+        if (${_CMAKE_OSX_SYSROOT_PATH} MATCHES "MacOS")
+            set(MACOS ON)
+	    # on macOS "uname -m" returns the architecture (x86_64 or arm64)
+	    if (NOT DEFINED MACOS_ARCH)
+        
+            execute_process(
+            COMMAND uname -m
+            RESULT_VARIABLE result
+            OUTPUT_VARIABLE MACOS_ARCH
+            OUTPUT_STRIP_TRAILING_WHITESPACE
+            )
+        endif()
+            add_definitions("-DDAP_OS_MAC -DDAP_OS_MAC_ARCH=${MACOS_ARCH}")
+        elseif (${_CMAKE_OSX_SYSROOT_PATH} MATCHES "iOS")
+            set(IOS ON)
+            add_definitions("-DDAP_OS_IOS")
+        else()
+            set(MACOS ON)
+            add_definitions("-DDAP_OS_MAC -DDAP_OS_MAC_ARCH=${MACOS_ARCH}")
+        endif()
+    endif()
+    
+    if (${CMAKE_SYSTEM_NAME} MATCHES "BSD" )
+        add_definitions ("-DDAP_OS_BSD")
+        set(BSD ON)
+    endif()
+
+    if (${CMAKE_SYSTEM_NAME} MATCHES "Linux" )
+        add_definitions ("-DDAP_OS_LINUX")
+    endif()
+    
+    set(CFLAGS_WARNINGS "-Wall -Wextra -Werror=sign-compare  -Wno-unused-command-line-argument -Wno-deprecated-declarations -Wno-unused-local-typedefs -Wno-unused-function -Wno-implicit-fallthrough -Wno-unused-variable -Wno-unused-parameter")
+    if (LINUX)
+        set(CCOPT_SYSTEM "")
+        set(LDOPT_SYSTEM "")
+        if(DAP_DEBUG)
+            set(_CCOPT "-DDAP_DEBUG ${CFLAGS_WARNINGS} -pg -g3 -ggdb -fno-eliminate-unused-debug-symbols -fno-strict-aliasing")
+            set(_LOPT "-pg")
+            if (DEFINED ENV{DAP_ASAN})
+                message("[!] Address Sanitizer enabled")
+                set(_CCOPT "${_CCOPT} -fsanitize=address -fsanitize-address-use-after-scope -fno-omit-frame-pointer -fno-common -O1")
+                set(_LOPT "${_LOPT} -fsanitize=address")
+            elseif(DEFINED ENV{DAP_MSAN})
+                if (CMAKE_C_COMPILER_ID MATCHES ".*[Cc][Ll][Aa][Nn][Gg].*")
+                    message("[!] Memory Sanitizer enabled")
+                    set(_CCOPT "${_CCOPT} -fsanitize=memory -fPIE -pie -fno-omit-frame-pointer -O2")
+                    set(_LOPT "${_LOPT} -fsanitize=memory -fPIE -pie")
+                else()
+                    message("[!] Memory Sanitizer is not available on this compiler")
+                endif()
+            elseif(DEFINED ENV{DAP_TSAN})
+                message("[!] Thread Sanitizer enabled")
+                set(_CCOPT "${_CCOPT} -fsanitize=thread")
+                set(_LOPT "${_LOPT} -fsanitize=thread")
+            elseif(DEFINED ENV{DAP_UBSAN})
+                message("[!] Undefined behaviour Sanitizer enabled")
+                set(_CCOPT "${_CCOPT} -fsanitize=undefined -fsanitize=bounds -fno-omit-frame-pointer")
+                set(_LOPT "${_LOPT} -fsanitize=undefined")
+            endif()
+            SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pg")
+        else()
+            set(_CCOPT "${CFLAGS_WARNINGS} -fPIC -fno-ident -ffast-math -ftree-vectorize -fno-asynchronous-unwind-tables -ffunction-sections -Wl,--gc-sections -std=gnu11")
+            if (DEFINED ENV{DAP_ASAN})
+                message("[!] Address Sanitizer enabled")
+                set(_CCOPT "${_CCOPT} -fsanitize=address -fsanitize-address-use-after-scope -fno-omit-frame-pointer -fno-common -O2")
+                set(_LOPT "${_LOPT} -fsanitize=address")
+            elseif(DEFINED ENV{DAP_MSAN})
+                if (CMAKE_C_COMPILER_ID MATCHES ".*[Cc][Ll][Aa][Nn][Gg].*")
+                    message("[!] Memory Sanitizer enabled")
+                    set(_CCOPT "${_CCOPT} -fsanitize=memory -fPIE -pie -fno-omit-frame-pointer -O2")
+                    set(_LOPT "${_LOPT} -fsanitize=memory -fPIE -pie")
+                else()
+                    message("[!] Memory Sanitizer is not available on this compiler")
+                endif()
+            elseif(DEFINED ENV{DAP_TSAN})
+                message("[!] Thread Sanitizer enabled")
+                set(_CCOPT "${_CCOPT} -fsanitize=thread")
+                set(_LOPT "${_LOPT} -fsanitize=thread")
+            elseif(DEFINED ENV{DAP_UBSAN})
+                message("[!] Undefined behaviour Sanitizer enabled")
+                set(_CCOPT "${_CCOPT} -fsanitize=undefined -fsanitize=bounds -fno-omit-frame-pointer")
+                set(_LOPT "${_LOPT} -fsanitize=undefined")
+            else()
+                set(_CCOPT "${_CCOPT} -O3")
+                if(NOT DAP_DBG_INFO)
+                    set(_CCOPT "${_CCOPT} -Wl,--strip-all")
+                endif()
+            endif()
+        endif()
+    elseif (DARWIN)
+        set(CCOPT_SYSTEM "-L/usr/local/lib -L/opt/homebrew/lib -I/opt/homebrew/include -I/usr/local/include")
+        set(LDOPT_SYSTEM "-L/usr/local/lib -L/opt/homebrew/lib -lintl -flat_namespace")
+        set(CCFLAGS_COMMON "-std=c11 ${CFLAGS_WARNINGS}")
+        if(DAP_DEBUG)
+          set(_CCOPT "${CCOPT_SYSTEM} -DDAP_DEBUG ${CCFLAGS_COMMON} -g3 -ggdb -fno-eliminate-unused-debug-symbols -fno-strict-aliasing")
+          set(_LOPT "${LDOPT_SYSTEM}")
+          SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
+        else()
+          set(_CCOPT "${CCOPT_SYSTEM} ${CCFLAGS_COMMON} -O3 -fPIC -fno-strict-aliasing -fno-ident -ffast-math -ftree-vectorize -fno-asynchronous-unwind-tables -ffunction-sections")
+          set(_LOPT "${LDOPT_SYSTEM}")
+          SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
+        endif()
+    elseif(BSD)
+        set(CCOPT_SYSTEM "-L/usr/local/lib -I/usr/local/include")
+        set(LDOPT_SYSTEM "-L/usr/local/lib")
+        if(DAP_DEBUG)
+          set(_CCOPT "${CCOPT_SYSTEM} -DDAP_DEBUG ${CFLAGS_WARNINGS} -pg -g3 -ggdb -fno-eliminate-unused-debug-symbols -fno-strict-aliasing")
+          set(_LOPT "-pg ${LDOPT_SYSTEM} ")
+	  SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pg")
+        else()
+          set(_CCOPT "${CCOPT_SYSTEM} ${CFLAGS_WARNINGS} -O3 -fPIC -fno-strict-aliasing -fno-ident -ffast-math -ftree-vectorize -fno-asynchronous-unwind-tables -ffunction-sections -std=gnu11")
+          set(_LOPT "${LDOPT_SYSTEM} ")
+          SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
+        endif()
+    endif()
+
+    if (ANDROID)
+        set(_CCOPT "${_CCOPT} -fforce-enable-int128 -std=gnu11")
+        add_definitions ("-DDAP_OS_ANDROID")
+        add_definitions ("-DDAP_OS_LINUX")
+    endif()
+
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_CCOPT}")
+    set(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} ${_LOPT}")
+
+endif()
+
+if(WIN32)
+    message(STATUS "[*] Building for Windows")
+    add_definitions ("-DDAP_OS_WINDOWS")
+    add_definitions ("-DUNDEBUG")
+    add_definitions ("-DWIN32")
+    add_definitions ("-D_WINDOWS")
+    add_definitions ("-D__WINDOWS__")
+    add_definitions ("-D_CRT_SECURE_NO_WARNINGS")
+    add_definitions ("-DCURL_STATICLIB")
+    add_definitions("-DHAVE_PREAD")
+    add_definitions("-DHAVE_MMAP")
+    add_definitions("-DHAVE_STRNDUP")
+    add_definitions("-DNGHTTP2_STATICLIB")
+    add_compile_definitions(WINVER=0x0600 _WIN32_WINNT=0x0600)
+    add_compile_definitions(__USE_MINGW_ANSI_STDIO=1)
+
+    set(CCOPT_SYSTEM "")
+    set(LDOPT_SYSTEM "")
+
+    if(DAP_DEBUG)
+      set(_CCOPT "-mconsole -static -std=gnu11 ${CFLAGS_WARNINGS} -g3 -ggdb -fno-strict-aliasing -fno-eliminate-unused-debug-symbols -pg")
+      set(_LOPT "-mconsole -static -pg")
+    else()
+      set(_CCOPT "-static -std=gnu11 ${CFLAGS_WARNINGS} -O3 -fPIC -fno-ident -ffast-math -fno-strict-aliasing -ftree-vectorize -mfpmath=sse -mmmx -msse2 -fno-asynchronous-unwind-tables -ffunction-sections -Wl,--gc-sections")
+      if(NOT DAP_DBG_INFO)
+          add_definitions ("-DNDEBUG")
+          set(_CCOPT "${_CCOPT} -Wl,--strip-all")
+      endif()
+    endif()
+
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_CCOPT} ")
+    set(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} ${_LOPT}")
+
+    include_directories(../../dap-sdk/3rdparty/uthash/src/)
+    include_directories(../../dap-sdk/3rdparty/json-c)
+    include_directories(3rdparty/wepoll/)
+    #include_directories(libdap-chain-net-srv-vpn/)
+endif()
diff --git a/test-framework/.gitignore b/test-framework/.gitignore
new file mode 100644
index 000000000..378eac25d
--- /dev/null
+++ b/test-framework/.gitignore
@@ -0,0 +1 @@
+build
diff --git a/test-framework/.travis.yml b/test-framework/.travis.yml
new file mode 100644
index 000000000..c8c4332f3
--- /dev/null
+++ b/test-framework/.travis.yml
@@ -0,0 +1,17 @@
+sudo: required
+language: c
+compiler: gcc
+dist: xenial
+notifications:
+  email: false
+
+script:
+    - mkdir build
+    - cd build 
+    - cmake ../
+    - make
+
+addons:
+  apt:
+    sources:
+    - ubuntu-toolchain-r-test
diff --git a/test-framework/CMakeLists.txt b/test-framework/CMakeLists.txt
new file mode 100644
index 000000000..70e543e45
--- /dev/null
+++ b/test-framework/CMakeLists.txt
@@ -0,0 +1,9 @@
+cmake_minimum_required(VERSION 3.0)
+if(TARGET dap_test)
+    return() # The project has already been built.
+endif()
+project(dap_test)
+
+add_library(${PROJECT_NAME} STATIC dap_test.h dap_test.c dap_test_generator.h dap_test_generator.c)
+
+target_include_directories(dap_test INTERFACE .)
diff --git a/test-framework/README.md b/test-framework/README.md
new file mode 100644
index 000000000..06cac1a30
--- /dev/null
+++ b/test-framework/README.md
@@ -0,0 +1,3 @@
+# libdap-test
+
+[![Build Status](https://travis-ci.com/kelvinblockchain/libdap-test.svg?branch=master)](https://travis-ci.com/kelvinblockchain/libdap-test)
diff --git a/test-framework/dap_test.c b/test-framework/dap_test.c
new file mode 100644
index 000000000..55517435e
--- /dev/null
+++ b/test-framework/dap_test.c
@@ -0,0 +1,112 @@
+#include "dap_test.h"
+
+#include <sys/time.h>
+
+/*
+ How to use benchmark_xxx() functions:
+
+ void mytest_func()
+ {
+ // doing something ...
+ }
+
+ // Repeat mytest_func() 5 time
+ int dt = benchmark_test_time(mytest_func, 5);
+ // Display result, sample 'Encode and decode PASS. (4 msec.)'
+ benchmark_mgs_time("Encode and decode", dt);
+
+ // Repeat mytest_func() within 2 second
+ float rate = benchmark_test_rate(mytest_func, 2);
+ // Display result, sample 'Encode and decode PASS. (703 times/sec.)'
+ benchmark_mgs_rate("Encode and decode", rate);
+
+ */
+
+#define dap_pass_msg_benchmark(testname, benchmark_text) \
+    printf("\t%s%s PASS. %s%s\n", TEXT_COLOR_GRN, testname, benchmark_text, TEXT_COLOR_RESET); \
+    fflush(stdout); \
+
+/**
+ * Display time in the format 'x.xx sec.' or 'xx msec.'
+ */
+void benchmark_mgs_time(const char *test_name, int dt)
+{
+    char buf[120];
+    if(abs(dt) >= 1000) {
+        snprintf(buf, 120, "(%.3lf sec.)", dt * 1. / 1000);
+    }
+    else {
+
+        snprintf(buf, 120, "(%d msec.)", dt);
+    }
+    dap_pass_msg_benchmark(test_name, buf);
+}
+
+/**
+ * Display rate in the format 'xx times/sec.'
+ */
+void benchmark_mgs_rate(const char *test_name, float rate)
+{
+    char buf[120];
+    if(rate > 100) {
+        snprintf(buf, 120, "(%.0lf times/sec.)", rate);
+    }
+    else if(rate > 10) {
+        snprintf(buf, 120, "%.1lf times/sec.", rate);
+    }
+    else {
+        snprintf(buf, 120, "%.2lf times/sec.", rate);
+    }
+    dap_pass_msg_benchmark(test_name, buf);
+}
+
+/**
+ * @return current time in milliseconds
+ */
+int get_cur_time_msec(void)
+{
+    struct timespec time;
+    clock_gettime(CLOCK_MONOTONIC, &time);
+    int msec = time.tv_sec * 1000 + (time.tv_nsec + 500000) / 1000000;
+    return msec;
+}
+
+/**
+ * Calculate the runtime of a function that repeat several times
+ * @func_name function for repeats
+ * @repeat how many times repeats
+ * @return time in milliseconds
+ */
+int benchmark_test_time(void (*func_name)(void), int repeat)
+{
+    int t1 = get_cur_time_msec();
+    for(int i = 0; i < repeat; i++)
+        func_name();
+    int t2 = get_cur_time_msec();
+    return t2 - t1;
+}
+
+/**
+ * Calculate the rate of a function that repeat at a minimum specified number of seconds
+ * @func_name function for repeats
+ * @repeat how many times repeats
+ * @return function rate, i.e. count per second
+ */
+float benchmark_test_rate(void (*func_name)(void), float sec)
+{
+    if(sec < 0.1f) {
+        dap_test_msg("undefined times/sec.");
+        return 0;
+    }
+    int t1 = get_cur_time_msec();
+    int repeat = 0, dt;
+    do {
+        func_name();
+        dt = (get_cur_time_msec() - t1);
+        repeat++;
+    }
+    while(dt < sec * 1000);
+    float rate = repeat * 1000.f / dt;
+    return rate;
+}
+
diff --git a/test-framework/dap_test.h b/test-framework/dap_test.h
new file mode 100755
index 000000000..4a6445d82
--- /dev/null
+++ b/test-framework/dap_test.h
@@ -0,0 +1,113 @@
+#pragma once
+#include <assert.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+
+#define TEXT_COLOR_RED   "\x1B[31m"
+#define TEXT_COLOR_GRN   "\x1B[32m"
+#define TEXT_COLOR_YEL   "\x1B[33m"
+#define TEXT_COLOR_BLU   "\x1B[34m"
+#define TEXT_COLOR_MAG   "\x1B[35m"
+#define TEXT_COLOR_CYN   "\x1B[36m"
+#define TEXT_COLOR_WHT   "\x1B[37m"
+#define TEXT_COLOR_RESET "\x1B[0m"
+
+/* Can be used like debug info during write test*/
+/**
+ * @brief Can be used like debug info during write test
+ */
+#define dap_test_msg(...) { \
+    printf("\t%s", TEXT_COLOR_WHT); \
+    printf(__VA_ARGS__); \
+    printf("%s\n", TEXT_COLOR_RESET); \
+    fflush(stdout); }
+
+#define dap_fail(msg) {\
+    printf("\t%s%s!%s\n", TEXT_COLOR_RED, msg, TEXT_COLOR_RESET); \
+    abort();}
+
+/* PIF - print if failed. For checking value in loop, for don't repeat output */
+/**
+ * @brief PIF - print if failed. For checking value in loop, for don't repeat output
+ */
+#define dap_assert_PIF(expr, msg) { \
+    if(expr) {} \
+    else { \
+    printf("\t%s%s FAILED!%s\n", TEXT_COLOR_RED, msg, TEXT_COLOR_RESET); \
+    abort(); } }
+
+/**
+ * @brief
+*/
+#define dap_assert(expr, testname) { \
+    if(expr) { \
+        printf("\t%s%s PASS.%s\n", TEXT_COLOR_GRN, testname, TEXT_COLOR_RESET); \
+        fflush(stdout); \
+    } else { \
+    printf("\t%s%s FAILED!%s\n", TEXT_COLOR_RED, testname, TEXT_COLOR_RESET); \
+    abort(); } } \
+
+/**
+ * @brief Display the name test
+*/
+#define dap_pass_msg(testname) { \
+    printf("\t%s%s PASS.%s\n", TEXT_COLOR_GRN, testname, TEXT_COLOR_RESET); \
+    fflush(stdout); } \
+
+/**
+ * @brief Display the name of the test module
+*/
+#define dap_print_module_name(module_name) { \
+    printf("%s%s passing the tests... %s\n", TEXT_COLOR_CYN, module_name, TEXT_COLOR_RESET); \
+    fflush(stdout); }
+
+#define dap_str_equals(str1, str2) strcmp(str1, str2) == 0
+#define dap_strn_equals(str1, str2, count) strncmp(str1, str2, count) == 0
+int get_cur_time_msec(void);
+
+/*
+ How to use benchmark_xxx() functions:
+
+ void mytest_func()
+ {
+ // doing something ...
+ }
+
+ // Repeat mytest_func() 5 time
+ int dt = benchmark_test_time(mytest_func, 5);
+ // Display result, sample 'Encode and decode PASS. (4 msec.)'
+ benchmark_mgs_time("Encode and decode", dt);
+
+ // Repeat mytest_func() within 2 second
+ float rate = benchmark_test_rate(mytest_func, 2);
+ // Display result, sample 'Encode and decode PASS. (703 times/sec.)'
+ benchmark_mgs_rate("Encode and decode", rate);
+
+ */
+
+/**
+ * Display time in the format 'x.xx sec.' or 'xx msec.'
+ */
+void benchmark_mgs_time(const char *text, int dt);
+
+/**
+ * Display rate in the format 'xx times/sec.'
+ */
+void benchmark_mgs_rate(const char *test_name, float rate);
+/**
+ * Calculate the runtime of a function that repeat several times
+ * @func_name function for repeats
+ * @repeat how many times repeats
+ * @return time in milliseconds
+ */
+int benchmark_test_time(void (*func_name)(void), int repeat);
+/**
+ * Calculate the rate of a function that repeat at a minimum specified number of seconds
+ * @func_name function for repeats
+ * @repeat how many times repeats
+ * @return function rate, i.e. count per second
+ */
+float benchmark_test_rate(void (*func_name)(void), float sec);
diff --git a/test-framework/dap_test_generator.c b/test-framework/dap_test_generator.c
new file mode 100644
index 000000000..6a540f692
--- /dev/null
+++ b/test-framework/dap_test_generator.c
@@ -0,0 +1,21 @@
+#include "dap_test_generator.h"
+
+#define BYTE_SIZE 255
+
+/**
+ * @brief The function fills an array with random numbers
+ * @param[out] array Takes a pointer to an array
+ * @param[in] size Size of the array passed in the array parameter
+ *
+ * The function fills an array with random integer non-negative values
+*/
+void generate_random_byte_array(uint8_t* array, const size_t size) {
+    srand((uint32_t)time(NULL));
+    for(size_t i = 0; i < size; i++) {
+        array[i] = (uint8_t)rand() % BYTE_SIZE;
+    }
+
+    // Last byte not should be 0
+    if (array[size - 1] == 0)
+        array[size - 1] = 1;
+}
diff --git a/test-framework/dap_test_generator.h b/test-framework/dap_test_generator.h
new file mode 100755
index 000000000..4c7406474
--- /dev/null
+++ b/test-framework/dap_test_generator.h
@@ -0,0 +1,7 @@
+#pragma once
+#include <stdint.h>
+#include <stdlib.h>
+#include <time.h>
+
+void generate_random_byte_array(uint8_t* array, const size_t size);
+
diff --git a/test-framework/docs/CMakeLists_8txt.html b/test-framework/docs/CMakeLists_8txt.html
new file mode 100644
index 000000000..a90286521
--- /dev/null
+++ b/test-framework/docs/CMakeLists_8txt.html
@@ -0,0 +1,120 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<title>LibDap-test: /home/blus/DemLabs/libdap/MVL/libdap-test/CMakeLists.txt File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+  $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">LibDap-test
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.11 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+  <div id="navrow2" class="tabs2">
+    <ul class="tablist">
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
+      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
+    </ul>
+  </div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+</div><!-- top -->
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle">
+<div class="title">/home/blus/DemLabs/libdap/MVL/libdap-test/CMakeLists.txt File Reference</div>  </div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:a2ed873368192cb7cc113ab2093062d06"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="CMakeLists_8txt.html#a2ed873368192cb7cc113ab2093062d06">cmake_minimum_required</a> (VERSION 3.0) if(TARGET dap_test) return() endif() project(dap_test) add_library($</td></tr>
+<tr class="separator:a2ed873368192cb7cc113ab2093062d06"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<h2 class="groupheader">Function Documentation</h2>
+<a class="anchor" id="a2ed873368192cb7cc113ab2093062d06"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">cmake_minimum_required </td>
+          <td>(</td>
+          <td class="paramtype">VERSION 3.&#160;</td>
+          <td class="paramname"><em>0</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.11
+</small></address>
+</body>
+</html>
diff --git a/test-framework/docs/README_8md.html b/test-framework/docs/README_8md.html
new file mode 100644
index 000000000..e07276532
--- /dev/null
+++ b/test-framework/docs/README_8md.html
@@ -0,0 +1,95 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<title>LibDap-test: /home/blus/DemLabs/libdap/MVL/libdap-test/README.md File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+  $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">LibDap-test
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.11 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+  <div id="navrow2" class="tabs2">
+    <ul class="tablist">
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
+      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
+    </ul>
+  </div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+</div><!-- top -->
+<div class="header">
+  <div class="headertitle">
+<div class="title">/home/blus/DemLabs/libdap/MVL/libdap-test/README.md File Reference</div>  </div>
+</div><!--header-->
+<div class="contents">
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.11
+</small></address>
+</body>
+</html>
diff --git a/test-framework/docs/arrowdown.png b/test-framework/docs/arrowdown.png
new file mode 100644
index 0000000000000000000000000000000000000000..0b63f6d38c4b9ec907b820192ebe9724ed6eca22
GIT binary patch
literal 246
zcmV<S015wzP)<h;3K|Lk000e1NJLTq000mG000&U1^@s6$*LTD0002JNkl<ZcmeI*
zAx;B97{&1)q=(=LT%h;h3{`DFU=Y+bY0?v5>kw!R34#Lv2LOS^S2tZA31X++9RY}n
zChwn@Z)Wz*WWHH{)HDtJnq&A2hk$<w7_^JU^7%7%0zJH4kA|nU6I?=t2?`YfNxzFd
zLI<~*e?p<IJGcmIw6zLXu+2_Dc6pD@(bhEM-}eIron6S{S?uGdd`*1=UDVom9yVbN
wee?!o*N50y`~~``KBRnn4>b-y(>?@z0iHr41EKCGp#T5?07*qoM6N<$f(V3Pvj6}9

literal 0
HcmV?d00001

diff --git a/test-framework/docs/arrowright.png b/test-framework/docs/arrowright.png
new file mode 100644
index 0000000000000000000000000000000000000000..c6ee22f937a07d1dbfc27c669d11f8ed13e2f152
GIT binary patch
literal 229
zcmV<B02=>^P)<h;3K|Lk000e1NJLTq000mG000&U1^@s6$*LTD00022Nkl<ZcmeI5
zJq`g;6h;q`*aoFUtJG`64iq|xMyXIs*n>R?RzRoKvklcaQ%HF6%rK2&ZgO(-ihJ_C
zzrK<r3Bb=(0g6xxp!U32tWOu)WH##T0rK!7uo|*cw6RYWr9yxxq2N&i=_#5kSpmd|
z3DT;|QpwOhR&)di$#aNpIVkD_gya#NrE7vMK**;p+$8f1VhPe)Xk`t*OK>gp4jgO(
fd_(yg|3PpEQb#9`a?Pz_00000NkvXXu0mjftR`5K

literal 0
HcmV?d00001

diff --git a/test-framework/docs/bc_s.png b/test-framework/docs/bc_s.png
new file mode 100644
index 0000000000000000000000000000000000000000..224b29aa9847d5a4b3902efd602b7ddf7d33e6c2
GIT binary patch
literal 676
zcmV;V0$crwP)<h;3K|Lk000e1NJLTq000O80015c1^@s65rAI}0007ONkl<ZcmeI5
z%WD%+6voe;xyj6=NhXt~4{e$zF*P<SZp4L@2Hd!iQY<tJD@e5{RU55hl&Talf{KWb
zN*6A=C`Gqz5#NvcXzNOCOH(I9n<#?l<k5ws2omoMCgj%s3y1G=&gJ~>y__>=_9%My
z{n931IS})GlGUF8K#6VIbs%684A^L3@%PlP2>_sk`UWPq@f;rU*V%rPy_ekbhXT&s
z(GN{DxFv}*vZp`F>S!r||M`I*nOwwKX+BC~3P5N3-)Y{65c;ywYiAh-1*hZcToLHK
ztpl1xomJ+Yb}K(cfbJr2=GNOnT!UFA7Vy~fBz8?J>XHsbZoDad^8PxfSa0GDgENZS
zuLCEqzb*xWX2CG*b&5IiO#NzrW*;`VC9455M`o1NBh+(k8~`XCEEoC1Ybwf;vr4K3
zg|EB<07?SOqHp9DhLpS&bzgo70I+ghB_#)K7H%AMU3v}xuyQq9&Bm~++VYhF09a+U
zl7>n7Jjm$K#b*FONz~fj;I->Bf;ule1prFN9FovcDGBkpg>)O*-}eLnC{6oZHZ$o%
zXKW$;0_{8hxHQ>l;_*HATI(`7t#^{$(zLe}h*mqwOc*nRY9=?Sx4OOeVIfI|0V(V2
zBrW#G7Ss9wvzr@>H*`r>zE<Gz)cj&*s5lRy$b&*W@2j<GZEpXZ$P|Z!4Q$_|`5gj>
z+e8bOBgqIgldUJlG(YUDviMB`9+DH8n-s9SXRLyJHO1!=wY^79WYZMTa(wiZ!zP66
zA~!21vmF3H2{ngD;+`6j#~6j;$*f*G_2ZD1E;9(yaw7d-QnSCpK(cR1zU3qU0000<
KMNUMnLSTYoA~SLT

literal 0
HcmV?d00001

diff --git a/test-framework/docs/bdwn.png b/test-framework/docs/bdwn.png
new file mode 100644
index 0000000000000000000000000000000000000000..940a0b950443a0bb1b216ac03c45b8a16c955452
GIT binary patch
literal 147
zcmeAS@N?(olHy`uVBq!ia0vp^>_E)H!3HEvS)PKZC{Gv1kP61Pb5HX&C<wUB513~7
zF-Lk{?g8$ijf`2F^ip|Vw7EpzIJxiU`6~>2wk~_T<sM_r%les%%^JdHy*A#$ew5wb
vr&wL1c8#4j*F5jfGT)c(PZrEb5O3m+yDrVre6KeTXbXd<tDnm{r-UW|3$!!q

literal 0
HcmV?d00001

diff --git a/test-framework/docs/closed.png b/test-framework/docs/closed.png
new file mode 100644
index 0000000000000000000000000000000000000000..98cc2c909da37a6df914fbf67780eebd99c597f5
GIT binary patch
literal 132
zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1|%O$WD@{V-kvUwAr*{o@8<G4C~~x2bkCl7
zlF9slZh~6z%aUT|WfKm3{P*dDAfv<6>{^CZMh(5KoB^r_<4^zF@3)Cp&&t3hdujKf
f*?bjBoY!V+E))@{xMcbjXe@)LtDnm{r-UW|*e5JT

literal 0
HcmV?d00001

diff --git a/test-framework/docs/dap__test_8c.html b/test-framework/docs/dap__test_8c.html
new file mode 100644
index 000000000..4c2d9fd16
--- /dev/null
+++ b/test-framework/docs/dap__test_8c.html
@@ -0,0 +1,205 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<title>LibDap-test: /home/blus/DemLabs/libdap/MVL/libdap-test/dap_test.c File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+  $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">LibDap-test
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.11 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+  <div id="navrow2" class="tabs2">
+    <ul class="tablist">
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
+      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
+    </ul>
+  </div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+</div><!-- top -->
+<div class="header">
+  <div class="summary">
+<a href="#define-members">Macros</a> &#124;
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle">
+<div class="title">/home/blus/DemLabs/libdap/MVL/libdap-test/dap_test.c File Reference</div>  </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><code>#include &quot;<a class="el" href="dap__test_8h_source.html">dap_test.h</a>&quot;</code><br />
+<code>#include &lt;stdio.h&gt;</code><br />
+</div><div class="textblock"><div class="dynheader">
+Include dependency graph for dap_test.c:</div>
+<div class="dyncontent">
+<div class="center"><img src="dap__test_8c__incl.png" border="0" usemap="#_2home_2blus_2DemLabs_2libdap_2MVL_2libdap-test_2dap__test_8c" alt=""/></div>
+<map name="_2home_2blus_2DemLabs_2libdap_2MVL_2libdap-test_2dap__test_8c" id="_2home_2blus_2DemLabs_2libdap_2MVL_2libdap-test_2dap__test_8c">
+</map>
+</div>
+</div><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
+Macros</h2></td></tr>
+<tr class="memitem:abd9e6255b7335bc41294be16a69db676"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dap__test_8c.html#abd9e6255b7335bc41294be16a69db676">MAX_PRINT_WIDTH</a>&#160;&#160;&#160;100</td></tr>
+<tr class="separator:abd9e6255b7335bc41294be16a69db676"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:a1afe6d5bf13280151f2bfaae81ac8bab"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dap__test_8c.html#a1afe6d5bf13280151f2bfaae81ac8bab">_printrepchar</a> (char c, size_t count)</td></tr>
+<tr class="separator:a1afe6d5bf13280151f2bfaae81ac8bab"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2ea8cdd673adb86824a4dadc9d8301a0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dap__test_8c.html#a2ea8cdd673adb86824a4dadc9d8301a0">dap_dump_hex</a> (const void *data, size_t size)</td></tr>
+<tr class="memdesc:a2ea8cdd673adb86824a4dadc9d8301a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function displays a dump.  <a href="#a2ea8cdd673adb86824a4dadc9d8301a0">More...</a><br /></td></tr>
+<tr class="separator:a2ea8cdd673adb86824a4dadc9d8301a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<h2 class="groupheader">Macro Definition Documentation</h2>
+<a class="anchor" id="abd9e6255b7335bc41294be16a69db676"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define MAX_PRINT_WIDTH&#160;&#160;&#160;100</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<h2 class="groupheader">Function Documentation</h2>
+<a class="anchor" id="a1afe6d5bf13280151f2bfaae81ac8bab"></a>
+<div class="memitem">
+<div class="memproto">
+<table class="mlabels">
+  <tr>
+  <td class="mlabels-left">
+      <table class="memname">
+        <tr>
+          <td class="memname">static void _printrepchar </td>
+          <td>(</td>
+          <td class="paramtype">char&#160;</td>
+          <td class="paramname"><em>c</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">size_t&#160;</td>
+          <td class="paramname"><em>count</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+  </td>
+  <td class="mlabels-right">
+<span class="mlabels"><span class="mlabel">static</span></span>  </td>
+  </tr>
+</table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a2ea8cdd673adb86824a4dadc9d8301a0"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void dap_dump_hex </td>
+          <td>(</td>
+          <td class="paramtype">const void *&#160;</td>
+          <td class="paramname"><em>data</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">size_t&#160;</td>
+          <td class="paramname"><em>size</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+<p>The function displays a dump. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>The data dump you want to display </td></tr>
+    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>The size of the data whose dump you want to display</td></tr>
+  </table>
+  </dd>
+</dl>
+<p>The function displays a dump, for example an array, in hex format </p>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.11
+</small></address>
+</body>
+</html>
diff --git a/test-framework/docs/dap__test_8c__incl.dot b/test-framework/docs/dap__test_8c__incl.dot
new file mode 100644
index 000000000..7a5ea56c6
--- /dev/null
+++ b/test-framework/docs/dap__test_8c__incl.dot
@@ -0,0 +1,21 @@
+digraph "/home/blus/DemLabs/libdap/MVL/libdap-test/dap_test.c"
+{
+  edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"];
+  node [fontname="Helvetica",fontsize="10",shape=record];
+  Node1 [label="/home/blus/DemLabs\l/libdap/MVL/libdap-test\l/dap_test.c",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black"];
+  Node1 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node2 [label="dap_test.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$dap__test_8h.html"];
+  Node2 -> Node3 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node3 [label="assert.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
+  Node2 -> Node4 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node4 [label="stdbool.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
+  Node2 -> Node5 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node5 [label="stdlib.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
+  Node2 -> Node6 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node6 [label="stdio.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
+  Node2 -> Node7 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node7 [label="string.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
+  Node2 -> Node8 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node8 [label="time.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
+  Node1 -> Node6 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+}
diff --git a/test-framework/docs/dap__test_8c__incl.md5 b/test-framework/docs/dap__test_8c__incl.md5
new file mode 100644
index 000000000..acf0ca1b8
--- /dev/null
+++ b/test-framework/docs/dap__test_8c__incl.md5
@@ -0,0 +1 @@
+f75029754efddcae9aff57db3a998459
\ No newline at end of file
diff --git a/test-framework/docs/dap__test_8h.html b/test-framework/docs/dap__test_8h.html
new file mode 100644
index 000000000..23c2eece5
--- /dev/null
+++ b/test-framework/docs/dap__test_8h.html
@@ -0,0 +1,427 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<title>LibDap-test: /home/blus/DemLabs/libdap/MVL/libdap-test/dap_test.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+  $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">LibDap-test
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.11 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+  <div id="navrow2" class="tabs2">
+    <ul class="tablist">
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
+      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
+    </ul>
+  </div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+</div><!-- top -->
+<div class="header">
+  <div class="summary">
+<a href="#define-members">Macros</a> &#124;
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle">
+<div class="title">/home/blus/DemLabs/libdap/MVL/libdap-test/dap_test.h File Reference</div>  </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><code>#include &lt;assert.h&gt;</code><br />
+<code>#include &lt;stdbool.h&gt;</code><br />
+<code>#include &lt;stdlib.h&gt;</code><br />
+<code>#include &lt;stdio.h&gt;</code><br />
+<code>#include &lt;string.h&gt;</code><br />
+<code>#include &lt;time.h&gt;</code><br />
+</div><div class="textblock"><div class="dynheader">
+Include dependency graph for dap_test.h:</div>
+<div class="dyncontent">
+<div class="center"><img src="dap__test_8h__incl.png" border="0" usemap="#_2home_2blus_2DemLabs_2libdap_2MVL_2libdap-test_2dap__test_8h" alt=""/></div>
+<!-- MAP 0 -->
+</div>
+</div><div class="textblock"><div class="dynheader">
+This graph shows which files directly or indirectly include this file:</div>
+<div class="dyncontent">
+<div class="center"><img src="dap__test_8h__dep__incl.png" border="0" usemap="#_2home_2blus_2DemLabs_2libdap_2MVL_2libdap-test_2dap__test_8hdep" alt=""/></div>
+<!-- MAP 1 -->
+</div>
+</div>
+<p><a href="dap__test_8h_source.html">Go to the source code of this file.</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
+Macros</h2></td></tr>
+<tr class="memitem:ae6403a24bf4b19d1790870bdb77e0ff6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dap__test_8h.html#ae6403a24bf4b19d1790870bdb77e0ff6">TEXT_COLOR_RED</a>&#160;&#160;&#160;&quot;\x1B[31m&quot;</td></tr>
+<tr class="separator:ae6403a24bf4b19d1790870bdb77e0ff6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3558e465da6a25d9ecd34818cdef0f38"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dap__test_8h.html#a3558e465da6a25d9ecd34818cdef0f38">TEXT_COLOR_GRN</a>&#160;&#160;&#160;&quot;\x1B[32m&quot;</td></tr>
+<tr class="separator:a3558e465da6a25d9ecd34818cdef0f38"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1a8ecbbb90c3fee647a485bb43735a0e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dap__test_8h.html#a1a8ecbbb90c3fee647a485bb43735a0e">TEXT_COLOR_YEL</a>&#160;&#160;&#160;&quot;\x1B[33m&quot;</td></tr>
+<tr class="separator:a1a8ecbbb90c3fee647a485bb43735a0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a97de8572e888bea0f33efac1599a5308"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dap__test_8h.html#a97de8572e888bea0f33efac1599a5308">TEXT_COLOR_BLU</a>&#160;&#160;&#160;&quot;\x1B[34m&quot;</td></tr>
+<tr class="separator:a97de8572e888bea0f33efac1599a5308"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6f533adddd363b4afff300c11dab3c41"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dap__test_8h.html#a6f533adddd363b4afff300c11dab3c41">TEXT_COLOR_MAG</a>&#160;&#160;&#160;&quot;\x1B[35m&quot;</td></tr>
+<tr class="separator:a6f533adddd363b4afff300c11dab3c41"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad0ea07279d343f0fd5b1b1409e131240"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dap__test_8h.html#ad0ea07279d343f0fd5b1b1409e131240">TEXT_COLOR_CYN</a>&#160;&#160;&#160;&quot;\x1B[36m&quot;</td></tr>
+<tr class="separator:ad0ea07279d343f0fd5b1b1409e131240"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:abc00f35dba32197c9c85b1f9915ddb48"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dap__test_8h.html#abc00f35dba32197c9c85b1f9915ddb48">TEXT_COLOR_WHT</a>&#160;&#160;&#160;&quot;\x1B[37m&quot;</td></tr>
+<tr class="separator:abc00f35dba32197c9c85b1f9915ddb48"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4588c5e18d03928f2a58e786d028e264"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dap__test_8h.html#a4588c5e18d03928f2a58e786d028e264">TEXT_COLOR_RESET</a>&#160;&#160;&#160;&quot;\x1B[0m&quot;</td></tr>
+<tr class="separator:a4588c5e18d03928f2a58e786d028e264"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1364daf3680e471ddfd1ac9567b887be"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dap__test_8h.html#a1364daf3680e471ddfd1ac9567b887be">dap_test_msg</a>(...)</td></tr>
+<tr class="memdesc:a1364daf3680e471ddfd1ac9567b887be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Can be used like debug info during write test.  <a href="#a1364daf3680e471ddfd1ac9567b887be">More...</a><br /></td></tr>
+<tr class="separator:a1364daf3680e471ddfd1ac9567b887be"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a9802d055159d6b06eb7a34d06b1d4462"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dap__test_8h.html#a9802d055159d6b06eb7a34d06b1d4462">dap_fail</a>(msg)</td></tr>
+<tr class="separator:a9802d055159d6b06eb7a34d06b1d4462"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac37da94c545302fb83d887466c2fb5d0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dap__test_8h.html#ac37da94c545302fb83d887466c2fb5d0">dap_assert_PIF</a>(expr,  msg)</td></tr>
+<tr class="memdesc:ac37da94c545302fb83d887466c2fb5d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">PIF - print if failed. For checking value in loop, for don't repeat output.  <a href="#ac37da94c545302fb83d887466c2fb5d0">More...</a><br /></td></tr>
+<tr class="separator:ac37da94c545302fb83d887466c2fb5d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa32aee4a91979a0fabe22cacffe68d83"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dap__test_8h.html#aa32aee4a91979a0fabe22cacffe68d83">dap_assert</a>(expr,  testname)</td></tr>
+<tr class="separator:aa32aee4a91979a0fabe22cacffe68d83"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4ac9860aafed5e1e68d19a71f70355b3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dap__test_8h.html#a4ac9860aafed5e1e68d19a71f70355b3">dap_pass_msg</a>(testname)&#160;&#160;&#160;printf(&quot;\t%s%s PASS.%s\n&quot;, TEXT_COLOR_GRN, testname, <a class="el" href="dap__test_8h.html#a4588c5e18d03928f2a58e786d028e264">TEXT_COLOR_RESET</a>); \</td></tr>
+<tr class="memdesc:a4ac9860aafed5e1e68d19a71f70355b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Display the name test.  <a href="#a4ac9860aafed5e1e68d19a71f70355b3">More...</a><br /></td></tr>
+<tr class="separator:a4ac9860aafed5e1e68d19a71f70355b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aea57bd01a18311666642532ef91407c0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dap__test_8h.html#aea57bd01a18311666642532ef91407c0">dap_print_module_name</a>(module_name)&#160;&#160;&#160;printf(&quot;%s%s passing the tests... %s\n&quot;, TEXT_COLOR_CYN, module_name, <a class="el" href="dap__test_8h.html#a4588c5e18d03928f2a58e786d028e264">TEXT_COLOR_RESET</a>);</td></tr>
+<tr class="memdesc:aea57bd01a18311666642532ef91407c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Display the name of the test module.  <a href="#aea57bd01a18311666642532ef91407c0">More...</a><br /></td></tr>
+<tr class="separator:aea57bd01a18311666642532ef91407c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:a2ea8cdd673adb86824a4dadc9d8301a0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dap__test_8h.html#a2ea8cdd673adb86824a4dadc9d8301a0">dap_dump_hex</a> (const void *data, size_t size)</td></tr>
+<tr class="memdesc:a2ea8cdd673adb86824a4dadc9d8301a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function displays a dump.  <a href="#a2ea8cdd673adb86824a4dadc9d8301a0">More...</a><br /></td></tr>
+<tr class="separator:a2ea8cdd673adb86824a4dadc9d8301a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<h2 class="groupheader">Macro Definition Documentation</h2>
+<a class="anchor" id="aa32aee4a91979a0fabe22cacffe68d83"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define dap_assert</td>
+          <td>(</td>
+          <td class="paramtype">&#160;</td>
+          <td class="paramname">expr, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">&#160;</td>
+          <td class="paramname">testname&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<b>Value:</b><div class="fragment"><div class="line"><span class="keywordflow">if</span>(expr) { \</div><div class="line">        printf(<span class="stringliteral">&quot;\t%s%s PASS.%s\n&quot;</span>, <a class="code" href="dap__test_8h.html#a3558e465da6a25d9ecd34818cdef0f38">TEXT_COLOR_GRN</a>, testname, <a class="code" href="dap__test_8h.html#a4588c5e18d03928f2a58e786d028e264">TEXT_COLOR_RESET</a>); \</div><div class="line">    } <span class="keywordflow">else</span> { \</div><div class="line">    printf(<span class="stringliteral">&quot;\t%s%s FAILED!%s\n&quot;</span>, <a class="code" href="dap__test_8h.html#ae6403a24bf4b19d1790870bdb77e0ff6">TEXT_COLOR_RED</a>, testname, <a class="code" href="dap__test_8h.html#a4588c5e18d03928f2a58e786d028e264">TEXT_COLOR_RESET</a>); \</div><div class="line">    exit(-1); }\</div><div class="ttc" id="dap__test_8h_html_ae6403a24bf4b19d1790870bdb77e0ff6"><div class="ttname"><a href="dap__test_8h.html#ae6403a24bf4b19d1790870bdb77e0ff6">TEXT_COLOR_RED</a></div><div class="ttdeci">#define TEXT_COLOR_RED</div><div class="ttdef"><b>Definition:</b> dap_test.h:9</div></div>
+<div class="ttc" id="dap__test_8h_html_a4588c5e18d03928f2a58e786d028e264"><div class="ttname"><a href="dap__test_8h.html#a4588c5e18d03928f2a58e786d028e264">TEXT_COLOR_RESET</a></div><div class="ttdeci">#define TEXT_COLOR_RESET</div><div class="ttdef"><b>Definition:</b> dap_test.h:16</div></div>
+<div class="ttc" id="dap__test_8h_html_a3558e465da6a25d9ecd34818cdef0f38"><div class="ttname"><a href="dap__test_8h.html#a3558e465da6a25d9ecd34818cdef0f38">TEXT_COLOR_GRN</a></div><div class="ttdeci">#define TEXT_COLOR_GRN</div><div class="ttdef"><b>Definition:</b> dap_test.h:10</div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a class="anchor" id="ac37da94c545302fb83d887466c2fb5d0"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define dap_assert_PIF</td>
+          <td>(</td>
+          <td class="paramtype">&#160;</td>
+          <td class="paramname">expr, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">&#160;</td>
+          <td class="paramname">msg&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<b>Value:</b><div class="fragment"><div class="line"><span class="keywordflow">if</span>(expr) {} \</div><div class="line">    else { \</div><div class="line">    printf(<span class="stringliteral">&quot;\t%s%s FAILED!%s\n&quot;</span>, <a class="code" href="dap__test_8h.html#ae6403a24bf4b19d1790870bdb77e0ff6">TEXT_COLOR_RED</a>, msg, <a class="code" href="dap__test_8h.html#a4588c5e18d03928f2a58e786d028e264">TEXT_COLOR_RESET</a>); \</div><div class="line">    exit(-1); }</div><div class="ttc" id="dap__test_8h_html_ae6403a24bf4b19d1790870bdb77e0ff6"><div class="ttname"><a href="dap__test_8h.html#ae6403a24bf4b19d1790870bdb77e0ff6">TEXT_COLOR_RED</a></div><div class="ttdeci">#define TEXT_COLOR_RED</div><div class="ttdef"><b>Definition:</b> dap_test.h:9</div></div>
+<div class="ttc" id="dap__test_8h_html_a4588c5e18d03928f2a58e786d028e264"><div class="ttname"><a href="dap__test_8h.html#a4588c5e18d03928f2a58e786d028e264">TEXT_COLOR_RESET</a></div><div class="ttdeci">#define TEXT_COLOR_RESET</div><div class="ttdef"><b>Definition:</b> dap_test.h:16</div></div>
+</div><!-- fragment -->
+<p>PIF - print if failed. For checking value in loop, for don't repeat output. </p>
+
+</div>
+</div>
+<a class="anchor" id="a9802d055159d6b06eb7a34d06b1d4462"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define dap_fail</td>
+          <td>(</td>
+          <td class="paramtype">&#160;</td>
+          <td class="paramname">msg</td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<b>Value:</b><div class="fragment"><div class="line">printf(<span class="stringliteral">&quot;\t%s%s!%s\n&quot;</span>, <a class="code" href="dap__test_8h.html#ae6403a24bf4b19d1790870bdb77e0ff6">TEXT_COLOR_RED</a>, msg, <a class="code" href="dap__test_8h.html#a4588c5e18d03928f2a58e786d028e264">TEXT_COLOR_RESET</a>); \</div><div class="line">    exit(-1);</div><div class="ttc" id="dap__test_8h_html_ae6403a24bf4b19d1790870bdb77e0ff6"><div class="ttname"><a href="dap__test_8h.html#ae6403a24bf4b19d1790870bdb77e0ff6">TEXT_COLOR_RED</a></div><div class="ttdeci">#define TEXT_COLOR_RED</div><div class="ttdef"><b>Definition:</b> dap_test.h:9</div></div>
+<div class="ttc" id="dap__test_8h_html_a4588c5e18d03928f2a58e786d028e264"><div class="ttname"><a href="dap__test_8h.html#a4588c5e18d03928f2a58e786d028e264">TEXT_COLOR_RESET</a></div><div class="ttdeci">#define TEXT_COLOR_RESET</div><div class="ttdef"><b>Definition:</b> dap_test.h:16</div></div>
+</div><!-- fragment -->
+</div>
+</div>
+<a class="anchor" id="a4ac9860aafed5e1e68d19a71f70355b3"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define dap_pass_msg</td>
+          <td>(</td>
+          <td class="paramtype">&#160;</td>
+          <td class="paramname">testname</td><td>)</td>
+          <td>&#160;&#160;&#160;printf(&quot;\t%s%s PASS.%s\n&quot;, TEXT_COLOR_GRN, testname, <a class="el" href="dap__test_8h.html#a4588c5e18d03928f2a58e786d028e264">TEXT_COLOR_RESET</a>); \</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+<p>Display the name test. </p>
+
+</div>
+</div>
+<a class="anchor" id="aea57bd01a18311666642532ef91407c0"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define dap_print_module_name</td>
+          <td>(</td>
+          <td class="paramtype">&#160;</td>
+          <td class="paramname">module_name</td><td>)</td>
+          <td>&#160;&#160;&#160;printf(&quot;%s%s passing the tests... %s\n&quot;, TEXT_COLOR_CYN, module_name, <a class="el" href="dap__test_8h.html#a4588c5e18d03928f2a58e786d028e264">TEXT_COLOR_RESET</a>);</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+<p>Display the name of the test module. </p>
+
+</div>
+</div>
+<a class="anchor" id="a1364daf3680e471ddfd1ac9567b887be"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define dap_test_msg</td>
+          <td>(</td>
+          <td class="paramtype">&#160;</td>
+          <td class="paramname"><em>...</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<b>Value:</b><div class="fragment"><div class="line">printf(<span class="stringliteral">&quot;\t%s&quot;</span>, <a class="code" href="dap__test_8h.html#abc00f35dba32197c9c85b1f9915ddb48">TEXT_COLOR_WHT</a>); \</div><div class="line">    printf(__VA_ARGS__); \</div><div class="line">    printf(<span class="stringliteral">&quot;%s\n&quot;</span>, <a class="code" href="dap__test_8h.html#a4588c5e18d03928f2a58e786d028e264">TEXT_COLOR_RESET</a>);</div><div class="ttc" id="dap__test_8h_html_a4588c5e18d03928f2a58e786d028e264"><div class="ttname"><a href="dap__test_8h.html#a4588c5e18d03928f2a58e786d028e264">TEXT_COLOR_RESET</a></div><div class="ttdeci">#define TEXT_COLOR_RESET</div><div class="ttdef"><b>Definition:</b> dap_test.h:16</div></div>
+<div class="ttc" id="dap__test_8h_html_abc00f35dba32197c9c85b1f9915ddb48"><div class="ttname"><a href="dap__test_8h.html#abc00f35dba32197c9c85b1f9915ddb48">TEXT_COLOR_WHT</a></div><div class="ttdeci">#define TEXT_COLOR_WHT</div><div class="ttdef"><b>Definition:</b> dap_test.h:15</div></div>
+</div><!-- fragment -->
+<p>Can be used like debug info during write test. </p>
+
+</div>
+</div>
+<a class="anchor" id="a97de8572e888bea0f33efac1599a5308"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define TEXT_COLOR_BLU&#160;&#160;&#160;&quot;\x1B[34m&quot;</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="ad0ea07279d343f0fd5b1b1409e131240"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define TEXT_COLOR_CYN&#160;&#160;&#160;&quot;\x1B[36m&quot;</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a3558e465da6a25d9ecd34818cdef0f38"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define TEXT_COLOR_GRN&#160;&#160;&#160;&quot;\x1B[32m&quot;</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a6f533adddd363b4afff300c11dab3c41"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define TEXT_COLOR_MAG&#160;&#160;&#160;&quot;\x1B[35m&quot;</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="ae6403a24bf4b19d1790870bdb77e0ff6"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define TEXT_COLOR_RED&#160;&#160;&#160;&quot;\x1B[31m&quot;</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a4588c5e18d03928f2a58e786d028e264"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define TEXT_COLOR_RESET&#160;&#160;&#160;&quot;\x1B[0m&quot;</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="abc00f35dba32197c9c85b1f9915ddb48"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define TEXT_COLOR_WHT&#160;&#160;&#160;&quot;\x1B[37m&quot;</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<a class="anchor" id="a1a8ecbbb90c3fee647a485bb43735a0e"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">#define TEXT_COLOR_YEL&#160;&#160;&#160;&quot;\x1B[33m&quot;</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+</div>
+</div>
+<h2 class="groupheader">Function Documentation</h2>
+<a class="anchor" id="a2ea8cdd673adb86824a4dadc9d8301a0"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void dap_dump_hex </td>
+          <td>(</td>
+          <td class="paramtype">const void *&#160;</td>
+          <td class="paramname"><em>data</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">size_t&#160;</td>
+          <td class="paramname"><em>size</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+<p>The function displays a dump. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>The data dump you want to display </td></tr>
+    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>The size of the data whose dump you want to display</td></tr>
+  </table>
+  </dd>
+</dl>
+<p>The function displays a dump, for example an array, in hex format </p>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.11
+</small></address>
+</body>
+</html>
diff --git a/test-framework/docs/dap__test_8h__dep__incl.dot b/test-framework/docs/dap__test_8h__dep__incl.dot
new file mode 100644
index 000000000..fec029bdf
--- /dev/null
+++ b/test-framework/docs/dap__test_8h__dep__incl.dot
@@ -0,0 +1,8 @@
+digraph "/home/blus/DemLabs/libdap/MVL/libdap-test/dap_test.h"
+{
+  edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"];
+  node [fontname="Helvetica",fontsize="10",shape=record];
+  Node1 [label="/home/blus/DemLabs\l/libdap/MVL/libdap-test\l/dap_test.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black"];
+  Node1 -> Node2 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node2 [label="/home/blus/DemLabs\l/libdap/MVL/libdap-test\l/dap_test.c",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$dap__test_8c.html"];
+}
diff --git a/test-framework/docs/dap__test_8h__dep__incl.md5 b/test-framework/docs/dap__test_8h__dep__incl.md5
new file mode 100644
index 000000000..5d24cb0a7
--- /dev/null
+++ b/test-framework/docs/dap__test_8h__dep__incl.md5
@@ -0,0 +1 @@
+95eb5b343cb3c099836e23013d109eb8
\ No newline at end of file
diff --git a/test-framework/docs/dap__test_8h__incl.dot b/test-framework/docs/dap__test_8h__incl.dot
new file mode 100644
index 000000000..9e4eb7787
--- /dev/null
+++ b/test-framework/docs/dap__test_8h__incl.dot
@@ -0,0 +1,18 @@
+digraph "/home/blus/DemLabs/libdap/MVL/libdap-test/dap_test.h"
+{
+  edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"];
+  node [fontname="Helvetica",fontsize="10",shape=record];
+  Node1 [label="/home/blus/DemLabs\l/libdap/MVL/libdap-test\l/dap_test.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black"];
+  Node1 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node2 [label="assert.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
+  Node1 -> Node3 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node3 [label="stdbool.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
+  Node1 -> Node4 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node4 [label="stdlib.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
+  Node1 -> Node5 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node5 [label="stdio.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
+  Node1 -> Node6 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node6 [label="string.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
+  Node1 -> Node7 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node7 [label="time.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
+}
diff --git a/test-framework/docs/dap__test_8h__incl.md5 b/test-framework/docs/dap__test_8h__incl.md5
new file mode 100644
index 000000000..01249a836
--- /dev/null
+++ b/test-framework/docs/dap__test_8h__incl.md5
@@ -0,0 +1 @@
+da16d626d83a8c2d5572bfb8c66bfeb9
\ No newline at end of file
diff --git a/test-framework/docs/dap__test_8h_source.html b/test-framework/docs/dap__test_8h_source.html
new file mode 100644
index 000000000..fce1e264d
--- /dev/null
+++ b/test-framework/docs/dap__test_8h_source.html
@@ -0,0 +1,96 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<title>LibDap-test: /home/blus/DemLabs/libdap/MVL/libdap-test/dap_test.h Source File</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+  $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">LibDap-test
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.11 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+  <div id="navrow2" class="tabs2">
+    <ul class="tablist">
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
+      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
+    </ul>
+  </div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="header">
+  <div class="headertitle">
+<div class="title">/home/blus/DemLabs/libdap/MVL/libdap-test/dap_test.h</div>  </div>
+</div><!--header-->
+<div class="contents">
+<a href="dap__test_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &lt;assert.h&gt;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &lt;stdbool.h&gt;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;stdlib.h&gt;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &lt;string.h&gt;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &lt;time.h&gt;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="dap__test_8h.html#ae6403a24bf4b19d1790870bdb77e0ff6">    9</a></span>&#160;<span class="preprocessor">#define TEXT_COLOR_RED   &quot;\x1B[31m&quot;</span></div><div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="dap__test_8h.html#a3558e465da6a25d9ecd34818cdef0f38">   10</a></span>&#160;<span class="preprocessor">#define TEXT_COLOR_GRN   &quot;\x1B[32m&quot;</span></div><div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="dap__test_8h.html#a1a8ecbbb90c3fee647a485bb43735a0e">   11</a></span>&#160;<span class="preprocessor">#define TEXT_COLOR_YEL   &quot;\x1B[33m&quot;</span></div><div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="dap__test_8h.html#a97de8572e888bea0f33efac1599a5308">   12</a></span>&#160;<span class="preprocessor">#define TEXT_COLOR_BLU   &quot;\x1B[34m&quot;</span></div><div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="dap__test_8h.html#a6f533adddd363b4afff300c11dab3c41">   13</a></span>&#160;<span class="preprocessor">#define TEXT_COLOR_MAG   &quot;\x1B[35m&quot;</span></div><div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="dap__test_8h.html#ad0ea07279d343f0fd5b1b1409e131240">   14</a></span>&#160;<span class="preprocessor">#define TEXT_COLOR_CYN   &quot;\x1B[36m&quot;</span></div><div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="dap__test_8h.html#abc00f35dba32197c9c85b1f9915ddb48">   15</a></span>&#160;<span class="preprocessor">#define TEXT_COLOR_WHT   &quot;\x1B[37m&quot;</span></div><div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="dap__test_8h.html#a4588c5e18d03928f2a58e786d028e264">   16</a></span>&#160;<span class="preprocessor">#define TEXT_COLOR_RESET &quot;\x1B[0m&quot;</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">/* Can be used like debug info during write test*/</span></div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="dap__test_8h.html#a1364daf3680e471ddfd1ac9567b887be">   22</a></span>&#160;<span class="preprocessor">#define dap_test_msg(...) \</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">    printf(&quot;\t%s&quot;, TEXT_COLOR_WHT); \</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">    printf(__VA_ARGS__); \</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">    printf(&quot;%s\n&quot;, TEXT_COLOR_RESET);</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="dap__test_8h.html#a9802d055159d6b06eb7a34d06b1d4462">   27</a></span>&#160;<span class="preprocessor">#define dap_fail(msg) \</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">    printf(&quot;\t%s%s!%s\n&quot;, TEXT_COLOR_RED, msg, TEXT_COLOR_RESET); \</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">    exit(-1);</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment">/* PIF - print if failed. For checking value in loop, for don&#39;t repeat output */</span></div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="dap__test_8h.html#ac37da94c545302fb83d887466c2fb5d0">   35</a></span>&#160;<span class="preprocessor">#define dap_assert_PIF(expr, msg) \</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">    if(expr) {} \</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">    else { \</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">    printf(&quot;\t%s%s FAILED!%s\n&quot;, TEXT_COLOR_RED, msg, TEXT_COLOR_RESET); \</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">    exit(-1); }</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="dap__test_8h.html#aa32aee4a91979a0fabe22cacffe68d83">   44</a></span>&#160;<span class="preprocessor">#define dap_assert(expr, testname) \</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor">    if(expr) { \</span></div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">        printf(&quot;\t%s%s PASS.%s\n&quot;, TEXT_COLOR_GRN, testname, TEXT_COLOR_RESET); \</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="preprocessor">    } else { \</span></div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor">    printf(&quot;\t%s%s FAILED!%s\n&quot;, TEXT_COLOR_RED, testname, TEXT_COLOR_RESET); \</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="preprocessor">    exit(-1); }\</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="dap__test_8h.html#a4ac9860aafed5e1e68d19a71f70355b3">   54</a></span>&#160;<span class="preprocessor">#define dap_pass_msg(testname) \</span></div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="preprocessor">    printf(&quot;\t%s%s PASS.%s\n&quot;, TEXT_COLOR_GRN, testname, TEXT_COLOR_RESET); \</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="preprocessor"></span></div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="dap__test_8h.html#aea57bd01a18311666642532ef91407c0">   60</a></span>&#160;<span class="preprocessor">#define dap_print_module_name(module_name) \</span></div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;<span class="preprocessor">   printf(&quot;%s%s passing the tests... %s\n&quot;, TEXT_COLOR_CYN, module_name, TEXT_COLOR_RESET);</span></div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="keywordtype">void</span> <a class="code" href="dap__test_8h.html#a2ea8cdd673adb86824a4dadc9d8301a0">dap_dump_hex</a>(<span class="keyword">const</span> <span class="keywordtype">void</span>* data, <span class="keywordtype">size_t</span> size);</div><div class="ttc" id="dap__test_8h_html_a2ea8cdd673adb86824a4dadc9d8301a0"><div class="ttname"><a href="dap__test_8h.html#a2ea8cdd673adb86824a4dadc9d8301a0">dap_dump_hex</a></div><div class="ttdeci">void dap_dump_hex(const void *data, size_t size)</div><div class="ttdoc">The function displays a dump. </div><div class="ttdef"><b>Definition:</b> dap_test.c:22</div></div>
+</div><!-- fragment --></div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.11
+</small></address>
+</body>
+</html>
diff --git a/test-framework/docs/dap__test__generator_8c.html b/test-framework/docs/dap__test__generator_8c.html
new file mode 100644
index 000000000..65a6cb77c
--- /dev/null
+++ b/test-framework/docs/dap__test__generator_8c.html
@@ -0,0 +1,155 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<title>LibDap-test: /home/blus/DemLabs/libdap/MVL/libdap-test/dap_test_generator.c File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+  $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">LibDap-test
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.11 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+  <div id="navrow2" class="tabs2">
+    <ul class="tablist">
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
+      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
+    </ul>
+  </div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+</div><!-- top -->
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle">
+<div class="title">/home/blus/DemLabs/libdap/MVL/libdap-test/dap_test_generator.c File Reference</div>  </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><code>#include &quot;<a class="el" href="dap__test__generator_8h_source.html">dap_test_generator.h</a>&quot;</code><br />
+</div><div class="textblock"><div class="dynheader">
+Include dependency graph for dap_test_generator.c:</div>
+<div class="dyncontent">
+<div class="center"><img src="dap__test__generator_8c__incl.png" border="0" usemap="#_2home_2blus_2DemLabs_2libdap_2MVL_2libdap-test_2dap__test__generator_8c" alt=""/></div>
+<!-- MAP 0 -->
+</div>
+</div><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:a0c9716d317a4813249aeac91b40329a2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dap__test__generator_8c.html#a0c9716d317a4813249aeac91b40329a2">generate_random_byte_array</a> (uint8_t *array, const size_t size, const int BYTE_SIZE)</td></tr>
+<tr class="memdesc:a0c9716d317a4813249aeac91b40329a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function fills an array with random numbers.  <a href="#a0c9716d317a4813249aeac91b40329a2">More...</a><br /></td></tr>
+<tr class="separator:a0c9716d317a4813249aeac91b40329a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<h2 class="groupheader">Function Documentation</h2>
+<a class="anchor" id="a0c9716d317a4813249aeac91b40329a2"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void generate_random_byte_array </td>
+          <td>(</td>
+          <td class="paramtype">uint8_t *&#160;</td>
+          <td class="paramname"><em>array</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const size_t&#160;</td>
+          <td class="paramname"><em>size</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const int&#160;</td>
+          <td class="paramname"><em>BYTE_SIZE</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+<p>The function fills an array with random numbers. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramdir">[out]</td><td class="paramname">array</td><td>Takes a pointer to an array </td></tr>
+    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Size of the array passed in the array parameter </td></tr>
+    <tr><td class="paramdir">[in]</td><td class="paramname">BYTE_SIZE</td><td>Takes the maximum value, range from zero to maximum</td></tr>
+  </table>
+  </dd>
+</dl>
+<p>The function fills an array with random integer non-negative values </p>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.11
+</small></address>
+</body>
+</html>
diff --git a/test-framework/docs/dap__test__generator_8c__incl.dot b/test-framework/docs/dap__test__generator_8c__incl.dot
new file mode 100644
index 000000000..366da9510
--- /dev/null
+++ b/test-framework/docs/dap__test__generator_8c__incl.dot
@@ -0,0 +1,14 @@
+digraph "/home/blus/DemLabs/libdap/MVL/libdap-test/dap_test_generator.c"
+{
+  edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"];
+  node [fontname="Helvetica",fontsize="10",shape=record];
+  Node1 [label="/home/blus/DemLabs\l/libdap/MVL/libdap-test\l/dap_test_generator.c",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black"];
+  Node1 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node2 [label="dap_test_generator.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$dap__test__generator_8h.html"];
+  Node2 -> Node3 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node3 [label="stdint.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
+  Node2 -> Node4 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node4 [label="stdlib.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
+  Node2 -> Node5 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node5 [label="time.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
+}
diff --git a/test-framework/docs/dap__test__generator_8c__incl.md5 b/test-framework/docs/dap__test__generator_8c__incl.md5
new file mode 100644
index 000000000..d9fbb159b
--- /dev/null
+++ b/test-framework/docs/dap__test__generator_8c__incl.md5
@@ -0,0 +1 @@
+046a09cb4dd642089086191710701ae3
\ No newline at end of file
diff --git a/test-framework/docs/dap__test__generator_8h.html b/test-framework/docs/dap__test__generator_8h.html
new file mode 100644
index 000000000..d31474b0f
--- /dev/null
+++ b/test-framework/docs/dap__test__generator_8h.html
@@ -0,0 +1,165 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<title>LibDap-test: /home/blus/DemLabs/libdap/MVL/libdap-test/dap_test_generator.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+  $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">LibDap-test
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.11 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+  <div id="navrow2" class="tabs2">
+    <ul class="tablist">
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
+      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
+    </ul>
+  </div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+</div><!-- top -->
+<div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
+  <div class="headertitle">
+<div class="title">/home/blus/DemLabs/libdap/MVL/libdap-test/dap_test_generator.h File Reference</div>  </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><code>#include &lt;stdint.h&gt;</code><br />
+<code>#include &lt;stdlib.h&gt;</code><br />
+<code>#include &lt;time.h&gt;</code><br />
+</div><div class="textblock"><div class="dynheader">
+Include dependency graph for dap_test_generator.h:</div>
+<div class="dyncontent">
+<div class="center"><img src="dap__test__generator_8h__incl.png" border="0" usemap="#_2home_2blus_2DemLabs_2libdap_2MVL_2libdap-test_2dap__test__generator_8h" alt=""/></div>
+<!-- MAP 0 -->
+</div>
+</div><div class="textblock"><div class="dynheader">
+This graph shows which files directly or indirectly include this file:</div>
+<div class="dyncontent">
+<div class="center"><img src="dap__test__generator_8h__dep__incl.png" border="0" usemap="#_2home_2blus_2DemLabs_2libdap_2MVL_2libdap-test_2dap__test__generator_8hdep" alt=""/></div>
+<!-- MAP 1 -->
+</div>
+</div>
+<p><a href="dap__test__generator_8h_source.html">Go to the source code of this file.</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:a0c9716d317a4813249aeac91b40329a2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dap__test__generator_8h.html#a0c9716d317a4813249aeac91b40329a2">generate_random_byte_array</a> (uint8_t *array, const size_t size, const int BYTE_SIZE)</td></tr>
+<tr class="memdesc:a0c9716d317a4813249aeac91b40329a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function fills an array with random numbers.  <a href="#a0c9716d317a4813249aeac91b40329a2">More...</a><br /></td></tr>
+<tr class="separator:a0c9716d317a4813249aeac91b40329a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<h2 class="groupheader">Function Documentation</h2>
+<a class="anchor" id="a0c9716d317a4813249aeac91b40329a2"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void generate_random_byte_array </td>
+          <td>(</td>
+          <td class="paramtype">uint8_t *&#160;</td>
+          <td class="paramname"><em>array</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const size_t&#160;</td>
+          <td class="paramname"><em>size</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const int&#160;</td>
+          <td class="paramname"><em>BYTE_SIZE</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+<p>The function fills an array with random numbers. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramdir">[out]</td><td class="paramname">array</td><td>Takes a pointer to an array </td></tr>
+    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Size of the array passed in the array parameter </td></tr>
+    <tr><td class="paramdir">[in]</td><td class="paramname">BYTE_SIZE</td><td>Takes the maximum value, range from zero to maximum</td></tr>
+  </table>
+  </dd>
+</dl>
+<p>The function fills an array with random integer non-negative values </p>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.11
+</small></address>
+</body>
+</html>
diff --git a/test-framework/docs/dap__test__generator_8h__dep__incl.dot b/test-framework/docs/dap__test__generator_8h__dep__incl.dot
new file mode 100644
index 000000000..96017f877
--- /dev/null
+++ b/test-framework/docs/dap__test__generator_8h__dep__incl.dot
@@ -0,0 +1,8 @@
+digraph "/home/blus/DemLabs/libdap/MVL/libdap-test/dap_test_generator.h"
+{
+  edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"];
+  node [fontname="Helvetica",fontsize="10",shape=record];
+  Node1 [label="/home/blus/DemLabs\l/libdap/MVL/libdap-test\l/dap_test_generator.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black"];
+  Node1 -> Node2 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node2 [label="/home/blus/DemLabs\l/libdap/MVL/libdap-test\l/dap_test_generator.c",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$dap__test__generator_8c.html"];
+}
diff --git a/test-framework/docs/dap__test__generator_8h__dep__incl.md5 b/test-framework/docs/dap__test__generator_8h__dep__incl.md5
new file mode 100644
index 000000000..00b574d84
--- /dev/null
+++ b/test-framework/docs/dap__test__generator_8h__dep__incl.md5
@@ -0,0 +1 @@
+4a2b206ff99bbc638580f185fdf4faf4
\ No newline at end of file
diff --git a/test-framework/docs/dap__test__generator_8h__incl.dot b/test-framework/docs/dap__test__generator_8h__incl.dot
new file mode 100644
index 000000000..495d50214
--- /dev/null
+++ b/test-framework/docs/dap__test__generator_8h__incl.dot
@@ -0,0 +1,12 @@
+digraph "/home/blus/DemLabs/libdap/MVL/libdap-test/dap_test_generator.h"
+{
+  edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"];
+  node [fontname="Helvetica",fontsize="10",shape=record];
+  Node1 [label="/home/blus/DemLabs\l/libdap/MVL/libdap-test\l/dap_test_generator.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black"];
+  Node1 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node2 [label="stdint.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
+  Node1 -> Node3 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node3 [label="stdlib.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
+  Node1 -> Node4 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node4 [label="time.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"];
+}
diff --git a/test-framework/docs/dap__test__generator_8h__incl.md5 b/test-framework/docs/dap__test__generator_8h__incl.md5
new file mode 100644
index 000000000..185a07b21
--- /dev/null
+++ b/test-framework/docs/dap__test__generator_8h__incl.md5
@@ -0,0 +1 @@
+860147a42d1e0364787d540faf3608c8
\ No newline at end of file
diff --git a/test-framework/docs/dap__test__generator_8h_source.html b/test-framework/docs/dap__test__generator_8h_source.html
new file mode 100644
index 000000000..bcd182e3a
--- /dev/null
+++ b/test-framework/docs/dap__test__generator_8h_source.html
@@ -0,0 +1,96 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<title>LibDap-test: /home/blus/DemLabs/libdap/MVL/libdap-test/dap_test_generator.h Source File</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+  $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">LibDap-test
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.11 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+  <div id="navrow2" class="tabs2">
+    <ul class="tablist">
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
+      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
+    </ul>
+  </div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="header">
+  <div class="headertitle">
+<div class="title">/home/blus/DemLabs/libdap/MVL/libdap-test/dap_test_generator.h</div>  </div>
+</div><!--header-->
+<div class="contents">
+<a href="dap__test__generator_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &lt;stdlib.h&gt;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;time.h&gt;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="keywordtype">void</span> <a class="code" href="dap__test__generator_8h.html#a0c9716d317a4813249aeac91b40329a2">generate_random_byte_array</a>(uint8_t* array, <span class="keyword">const</span> <span class="keywordtype">size_t</span> size, <span class="keyword">const</span> <span class="keywordtype">int</span> BYTE_SIZE);</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div><div class="ttc" id="dap__test__generator_8h_html_a0c9716d317a4813249aeac91b40329a2"><div class="ttname"><a href="dap__test__generator_8h.html#a0c9716d317a4813249aeac91b40329a2">generate_random_byte_array</a></div><div class="ttdeci">void generate_random_byte_array(uint8_t *array, const size_t size, const int BYTE_SIZE)</div><div class="ttdoc">The function fills an array with random numbers. </div><div class="ttdef"><b>Definition:</b> dap_test_generator.c:11</div></div>
+</div><!-- fragment --></div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.11
+</small></address>
+</body>
+</html>
diff --git a/test-framework/docs/doc.png b/test-framework/docs/doc.png
new file mode 100644
index 0000000000000000000000000000000000000000..17edabff95f7b8da13c9516a04efe05493c29501
GIT binary patch
literal 746
zcmV<G0u}v<P)<h;3K|Lk000e1NJLTq000;O000&U1^@s6+I?Jz00089Nkl<ZcmeI5
zO;1x>7=@pnbNXRFEm&G8P!&WHG=d)>K?YZ1bzou)2{$))<VZ%w8AHp|fq%mP;4ffy
zZ-fC6h(S;T@^On$pg;?)``rZ-=s7qr4DR5hE4!!NdDmX=TJJeiSGimUI5QXkXNfZ>
zumDct!>4SyxL;zgaG>wy`^Hv*+}0kUfCrz~BCOViSb$_*&;{TGGn2^x9K*!Sf0=lV
zpP=7O;GA0*Jm*tTYj$IoXvimpnV4S1Z5f$p*f$Db2iq2zrVGQUz~yq`ahn7ck(|CE
z7Gz;%OP~J6)tEZWDzjhL9h2hdfoU2)Nd%T<5Kt;Y0XLt&<@6pQx!n<GayH9yHg8K}
z>w*5`@bq#?l*?3z{Hlzoc=Pr>oB5(9i6~_&-}A(4{Q$>c>%rV&E|a(r&;?i5cQB=}
zYSDU5nXG)NS4HEs0it2AHe2>shCyr7`6@4*6{r@8fXR<pt)Tx_l7FX`b+T&0J~3Ac
zDisC2f48s?Pz6U1j(Y#7FGXj244=p1VQ-4TfmZrD8|c58q%jdB67*815?3si0IJ}q
zK#I#XHom~r+!`&75xy*K>bTA?=IFVWAQJL&H5H{)DpM#{W(GL+Idzf^)uRV@oB8u$
z8v{MfJbTiiRg4bza<41N<zz(9MkMF~u!W-n>Azrl{=3fl_D+$t+^!xlQ8S}{UtY`e
z;;&9UhyZqQRN%2pot{*Ei0*4~hSF_3AH2@fKU!$NSflS>{@tZpDT4`M2WRTTVH+D?
z)GFlEGGHe?koB}i|1w45!BF}N_q&^HJ&-tyR{(afC6H7|aml|tBBbv}55C5DNP8p3
z)~jLEO4Z&2hZmP^i-e%(@d!(E|KRafiU8Q5u(wU((j8un3<FfbmLT1ma;4wB2Ka6K
c|6iFu0IFBSu=gW%4*&oF07*qoM6N<$f>OR*Hvj+t

literal 0
HcmV?d00001

diff --git a/test-framework/docs/doxygen.css b/test-framework/docs/doxygen.css
new file mode 100644
index 000000000..1425ec530
--- /dev/null
+++ b/test-framework/docs/doxygen.css
@@ -0,0 +1,1475 @@
+/* The standard CSS for doxygen 1.8.11 */
+
+body, table, div, p, dl {
+	font: 400 14px/22px Roboto,sans-serif;
+}
+
+/* @group Heading Levels */
+
+h1.groupheader {
+	font-size: 150%;
+}
+
+.title {
+	font: 400 14px/28px Roboto,sans-serif;
+	font-size: 150%;
+	font-weight: bold;
+	margin: 10px 2px;
+}
+
+h2.groupheader {
+	border-bottom: 1px solid #879ECB;
+	color: #354C7B;
+	font-size: 150%;
+	font-weight: normal;
+	margin-top: 1.75em;
+	padding-top: 8px;
+	padding-bottom: 4px;
+	width: 100%;
+}
+
+h3.groupheader {
+	font-size: 100%;
+}
+
+h1, h2, h3, h4, h5, h6 {
+	-webkit-transition: text-shadow 0.5s linear;
+	-moz-transition: text-shadow 0.5s linear;
+	-ms-transition: text-shadow 0.5s linear;
+	-o-transition: text-shadow 0.5s linear;
+	transition: text-shadow 0.5s linear;
+	margin-right: 15px;
+}
+
+h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow {
+	text-shadow: 0 0 15px cyan;
+}
+
+dt {
+	font-weight: bold;
+}
+
+div.multicol {
+	-moz-column-gap: 1em;
+	-webkit-column-gap: 1em;
+	-moz-column-count: 3;
+	-webkit-column-count: 3;
+}
+
+p.startli, p.startdd {
+	margin-top: 2px;
+}
+
+p.starttd {
+	margin-top: 0px;
+}
+
+p.endli {
+	margin-bottom: 0px;
+}
+
+p.enddd {
+	margin-bottom: 4px;
+}
+
+p.endtd {
+	margin-bottom: 2px;
+}
+
+/* @end */
+
+caption {
+	font-weight: bold;
+}
+
+span.legend {
+        font-size: 70%;
+        text-align: center;
+}
+
+h3.version {
+        font-size: 90%;
+        text-align: center;
+}
+
+div.qindex, div.navtab{
+	background-color: #EBEFF6;
+	border: 1px solid #A3B4D7;
+	text-align: center;
+}
+
+div.qindex, div.navpath {
+	width: 100%;
+	line-height: 140%;
+}
+
+div.navtab {
+	margin-right: 15px;
+}
+
+/* @group Link Styling */
+
+a {
+	color: #3D578C;
+	font-weight: normal;
+	text-decoration: none;
+}
+
+.contents a:visited {
+	color: #4665A2;
+}
+
+a:hover {
+	text-decoration: underline;
+}
+
+a.qindex {
+	font-weight: bold;
+}
+
+a.qindexHL {
+	font-weight: bold;
+	background-color: #9CAFD4;
+	color: #ffffff;
+	border: 1px double #869DCA;
+}
+
+.contents a.qindexHL:visited {
+        color: #ffffff;
+}
+
+a.el {
+	font-weight: bold;
+}
+
+a.elRef {
+}
+
+a.code, a.code:visited, a.line, a.line:visited {
+	color: #4665A2; 
+}
+
+a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited {
+	color: #4665A2; 
+}
+
+/* @end */
+
+dl.el {
+	margin-left: -1cm;
+}
+
+pre.fragment {
+        border: 1px solid #C4CFE5;
+        background-color: #FBFCFD;
+        padding: 4px 6px;
+        margin: 4px 8px 4px 2px;
+        overflow: auto;
+        word-wrap: break-word;
+        font-size:  9pt;
+        line-height: 125%;
+        font-family: monospace, fixed;
+        font-size: 105%;
+}
+
+div.fragment {
+        padding: 4px 6px;
+        margin: 4px 8px 4px 2px;
+	background-color: #FBFCFD;
+	border: 1px solid #C4CFE5;
+}
+
+div.line {
+	font-family: monospace, fixed;
+        font-size: 13px;
+	min-height: 13px;
+	line-height: 1.0;
+	text-wrap: unrestricted;
+	white-space: -moz-pre-wrap; /* Moz */
+	white-space: -pre-wrap;     /* Opera 4-6 */
+	white-space: -o-pre-wrap;   /* Opera 7 */
+	white-space: pre-wrap;      /* CSS3  */
+	word-wrap: break-word;      /* IE 5.5+ */
+	text-indent: -53px;
+	padding-left: 53px;
+	padding-bottom: 0px;
+	margin: 0px;
+	-webkit-transition-property: background-color, box-shadow;
+	-webkit-transition-duration: 0.5s;
+	-moz-transition-property: background-color, box-shadow;
+	-moz-transition-duration: 0.5s;
+	-ms-transition-property: background-color, box-shadow;
+	-ms-transition-duration: 0.5s;
+	-o-transition-property: background-color, box-shadow;
+	-o-transition-duration: 0.5s;
+	transition-property: background-color, box-shadow;
+	transition-duration: 0.5s;
+}
+
+div.line:after {
+    content:"\000A";
+    white-space: pre;
+}
+
+div.line.glow {
+	background-color: cyan;
+	box-shadow: 0 0 10px cyan;
+}
+
+
+span.lineno {
+	padding-right: 4px;
+	text-align: right;
+	border-right: 2px solid #0F0;
+	background-color: #E8E8E8;
+        white-space: pre;
+}
+span.lineno a {
+	background-color: #D8D8D8;
+}
+
+span.lineno a:hover {
+	background-color: #C8C8C8;
+}
+
+div.ah, span.ah {
+	background-color: black;
+	font-weight: bold;
+	color: #ffffff;
+	margin-bottom: 3px;
+	margin-top: 3px;
+	padding: 0.2em;
+	border: solid thin #333;
+	border-radius: 0.5em;
+	-webkit-border-radius: .5em;
+	-moz-border-radius: .5em;
+	box-shadow: 2px 2px 3px #999;
+	-webkit-box-shadow: 2px 2px 3px #999;
+	-moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
+	background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
+	background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%);
+}
+
+div.classindex ul {
+        list-style: none;
+        padding-left: 0;
+}
+
+div.classindex span.ai {
+        display: inline-block;
+}
+
+div.groupHeader {
+	margin-left: 16px;
+	margin-top: 12px;
+	font-weight: bold;
+}
+
+div.groupText {
+	margin-left: 16px;
+	font-style: italic;
+}
+
+body {
+	background-color: white;
+	color: black;
+        margin: 0;
+}
+
+div.contents {
+	margin-top: 10px;
+	margin-left: 12px;
+	margin-right: 8px;
+}
+
+td.indexkey {
+	background-color: #EBEFF6;
+	font-weight: bold;
+	border: 1px solid #C4CFE5;
+	margin: 2px 0px 2px 0;
+	padding: 2px 10px;
+        white-space: nowrap;
+        vertical-align: top;
+}
+
+td.indexvalue {
+	background-color: #EBEFF6;
+	border: 1px solid #C4CFE5;
+	padding: 2px 10px;
+	margin: 2px 0px;
+}
+
+tr.memlist {
+	background-color: #EEF1F7;
+}
+
+p.formulaDsp {
+	text-align: center;
+}
+
+img.formulaDsp {
+	
+}
+
+img.formulaInl {
+	vertical-align: middle;
+}
+
+div.center {
+	text-align: center;
+        margin-top: 0px;
+        margin-bottom: 0px;
+        padding: 0px;
+}
+
+div.center img {
+	border: 0px;
+}
+
+address.footer {
+	text-align: right;
+	padding-right: 12px;
+}
+
+img.footer {
+	border: 0px;
+	vertical-align: middle;
+}
+
+/* @group Code Colorization */
+
+span.keyword {
+	color: #008000
+}
+
+span.keywordtype {
+	color: #604020
+}
+
+span.keywordflow {
+	color: #e08000
+}
+
+span.comment {
+	color: #800000
+}
+
+span.preprocessor {
+	color: #806020
+}
+
+span.stringliteral {
+	color: #002080
+}
+
+span.charliteral {
+	color: #008080
+}
+
+span.vhdldigit { 
+	color: #ff00ff 
+}
+
+span.vhdlchar { 
+	color: #000000 
+}
+
+span.vhdlkeyword { 
+	color: #700070 
+}
+
+span.vhdllogic { 
+	color: #ff0000 
+}
+
+blockquote {
+        background-color: #F7F8FB;
+        border-left: 2px solid #9CAFD4;
+        margin: 0 24px 0 4px;
+        padding: 0 12px 0 16px;
+}
+
+/* @end */
+
+/*
+.search {
+	color: #003399;
+	font-weight: bold;
+}
+
+form.search {
+	margin-bottom: 0px;
+	margin-top: 0px;
+}
+
+input.search {
+	font-size: 75%;
+	color: #000080;
+	font-weight: normal;
+	background-color: #e8eef2;
+}
+*/
+
+td.tiny {
+	font-size: 75%;
+}
+
+.dirtab {
+	padding: 4px;
+	border-collapse: collapse;
+	border: 1px solid #A3B4D7;
+}
+
+th.dirtab {
+	background: #EBEFF6;
+	font-weight: bold;
+}
+
+hr {
+	height: 0px;
+	border: none;
+	border-top: 1px solid #4A6AAA;
+}
+
+hr.footer {
+	height: 1px;
+}
+
+/* @group Member Descriptions */
+
+table.memberdecls {
+	border-spacing: 0px;
+	padding: 0px;
+}
+
+.memberdecls td, .fieldtable tr {
+	-webkit-transition-property: background-color, box-shadow;
+	-webkit-transition-duration: 0.5s;
+	-moz-transition-property: background-color, box-shadow;
+	-moz-transition-duration: 0.5s;
+	-ms-transition-property: background-color, box-shadow;
+	-ms-transition-duration: 0.5s;
+	-o-transition-property: background-color, box-shadow;
+	-o-transition-duration: 0.5s;
+	transition-property: background-color, box-shadow;
+	transition-duration: 0.5s;
+}
+
+.memberdecls td.glow, .fieldtable tr.glow {
+	background-color: cyan;
+	box-shadow: 0 0 15px cyan;
+}
+
+.mdescLeft, .mdescRight,
+.memItemLeft, .memItemRight,
+.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
+	background-color: #F9FAFC;
+	border: none;
+	margin: 4px;
+	padding: 1px 0 0 8px;
+}
+
+.mdescLeft, .mdescRight {
+	padding: 0px 8px 4px 8px;
+	color: #555;
+}
+
+.memSeparator {
+        border-bottom: 1px solid #DEE4F0;
+        line-height: 1px;
+        margin: 0px;
+        padding: 0px;
+}
+
+.memItemLeft, .memTemplItemLeft {
+        white-space: nowrap;
+}
+
+.memItemRight {
+	width: 100%;
+}
+
+.memTemplParams {
+	color: #4665A2;
+        white-space: nowrap;
+	font-size: 80%;
+}
+
+/* @end */
+
+/* @group Member Details */
+
+/* Styles for detailed member documentation */
+
+.memtemplate {
+	font-size: 80%;
+	color: #4665A2;
+	font-weight: normal;
+	margin-left: 9px;
+}
+
+.memnav {
+	background-color: #EBEFF6;
+	border: 1px solid #A3B4D7;
+	text-align: center;
+	margin: 2px;
+	margin-right: 15px;
+	padding: 2px;
+}
+
+.mempage {
+	width: 100%;
+}
+
+.memitem {
+	padding: 0;
+	margin-bottom: 10px;
+	margin-right: 5px;
+        -webkit-transition: box-shadow 0.5s linear;
+        -moz-transition: box-shadow 0.5s linear;
+        -ms-transition: box-shadow 0.5s linear;
+        -o-transition: box-shadow 0.5s linear;
+        transition: box-shadow 0.5s linear;
+        display: table !important;
+        width: 100%;
+}
+
+.memitem.glow {
+         box-shadow: 0 0 15px cyan;
+}
+
+.memname {
+        font-weight: bold;
+        margin-left: 6px;
+}
+
+.memname td {
+	vertical-align: bottom;
+}
+
+.memproto, dl.reflist dt {
+        border-top: 1px solid #A8B8D9;
+        border-left: 1px solid #A8B8D9;
+        border-right: 1px solid #A8B8D9;
+        padding: 6px 0px 6px 0px;
+        color: #253555;
+        font-weight: bold;
+        text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
+        background-image:url('nav_f.png');
+        background-repeat:repeat-x;
+        background-color: #E2E8F2;
+        /* opera specific markup */
+        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+        border-top-right-radius: 4px;
+        border-top-left-radius: 4px;
+        /* firefox specific markup */
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+        -moz-border-radius-topright: 4px;
+        -moz-border-radius-topleft: 4px;
+        /* webkit specific markup */
+        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+        -webkit-border-top-right-radius: 4px;
+        -webkit-border-top-left-radius: 4px;
+
+}
+
+.memdoc, dl.reflist dd {
+        border-bottom: 1px solid #A8B8D9;      
+        border-left: 1px solid #A8B8D9;      
+        border-right: 1px solid #A8B8D9; 
+        padding: 6px 10px 2px 10px;
+        background-color: #FBFCFD;
+        border-top-width: 0;
+        background-image:url('nav_g.png');
+        background-repeat:repeat-x;
+        background-color: #FFFFFF;
+        /* opera specific markup */
+        border-bottom-left-radius: 4px;
+        border-bottom-right-radius: 4px;
+        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+        /* firefox specific markup */
+        -moz-border-radius-bottomleft: 4px;
+        -moz-border-radius-bottomright: 4px;
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+        /* webkit specific markup */
+        -webkit-border-bottom-left-radius: 4px;
+        -webkit-border-bottom-right-radius: 4px;
+        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+}
+
+dl.reflist dt {
+        padding: 5px;
+}
+
+dl.reflist dd {
+        margin: 0px 0px 10px 0px;
+        padding: 5px;
+}
+
+.paramkey {
+	text-align: right;
+}
+
+.paramtype {
+	white-space: nowrap;
+}
+
+.paramname {
+	color: #602020;
+	white-space: nowrap;
+}
+.paramname em {
+	font-style: normal;
+}
+.paramname code {
+        line-height: 14px;
+}
+
+.params, .retval, .exception, .tparams {
+        margin-left: 0px;
+        padding-left: 0px;
+}       
+
+.params .paramname, .retval .paramname {
+        font-weight: bold;
+        vertical-align: top;
+}
+        
+.params .paramtype {
+        font-style: italic;
+        vertical-align: top;
+}       
+        
+.params .paramdir {
+        font-family: "courier new",courier,monospace;
+        vertical-align: top;
+}
+
+table.mlabels {
+	border-spacing: 0px;
+}
+
+td.mlabels-left {
+	width: 100%;
+	padding: 0px;
+}
+
+td.mlabels-right {
+	vertical-align: bottom;
+	padding: 0px;
+	white-space: nowrap;
+}
+
+span.mlabels {
+        margin-left: 8px;
+}
+
+span.mlabel {
+        background-color: #728DC1;
+        border-top:1px solid #5373B4;
+        border-left:1px solid #5373B4;
+        border-right:1px solid #C4CFE5;
+        border-bottom:1px solid #C4CFE5;
+	text-shadow: none;
+	color: white;
+	margin-right: 4px;
+	padding: 2px 3px;
+	border-radius: 3px;
+	font-size: 7pt;
+	white-space: nowrap;
+	vertical-align: middle;
+}
+
+
+
+/* @end */
+
+/* these are for tree view inside a (index) page */
+
+div.directory {
+        margin: 10px 0px;
+        border-top: 1px solid #9CAFD4;
+        border-bottom: 1px solid #9CAFD4;
+        width: 100%;
+}
+
+.directory table {
+        border-collapse:collapse;
+}
+
+.directory td {
+        margin: 0px;
+        padding: 0px;
+	vertical-align: top;
+}
+
+.directory td.entry {
+        white-space: nowrap;
+        padding-right: 6px;
+	padding-top: 3px;
+}
+
+.directory td.entry a {
+        outline:none;
+}
+
+.directory td.entry a img {
+        border: none;
+}
+
+.directory td.desc {
+        width: 100%;
+        padding-left: 6px;
+	padding-right: 6px;
+	padding-top: 3px;
+	border-left: 1px solid rgba(0,0,0,0.05);
+}
+
+.directory tr.even {
+	padding-left: 6px;
+	background-color: #F7F8FB;
+}
+
+.directory img {
+	vertical-align: -30%;
+}
+
+.directory .levels {
+        white-space: nowrap;
+        width: 100%;
+        text-align: right;
+        font-size: 9pt;
+}
+
+.directory .levels span {
+        cursor: pointer;
+        padding-left: 2px;
+        padding-right: 2px;
+	color: #3D578C;
+}
+
+.arrow {
+    color: #9CAFD4;
+    -webkit-user-select: none;
+    -khtml-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+    cursor: pointer;
+    font-size: 80%;
+    display: inline-block;
+    width: 16px;
+    height: 22px;
+}
+
+.icon {
+    font-family: Arial, Helvetica;
+    font-weight: bold;
+    font-size: 12px;
+    height: 14px;
+    width: 16px;
+    display: inline-block;
+    background-color: #728DC1;
+    color: white;
+    text-align: center;
+    border-radius: 4px;
+    margin-left: 2px;
+    margin-right: 2px;
+}
+
+.icona {
+    width: 24px;
+    height: 22px;
+    display: inline-block;
+}
+
+.iconfopen {
+    width: 24px;
+    height: 18px;
+    margin-bottom: 4px;
+    background-image:url('folderopen.png');
+    background-position: 0px -4px;
+    background-repeat: repeat-y;
+    vertical-align:top;
+    display: inline-block;
+}
+
+.iconfclosed {
+    width: 24px;
+    height: 18px;
+    margin-bottom: 4px;
+    background-image:url('folderclosed.png');
+    background-position: 0px -4px;
+    background-repeat: repeat-y;
+    vertical-align:top;
+    display: inline-block;
+}
+
+.icondoc {
+    width: 24px;
+    height: 18px;
+    margin-bottom: 4px;
+    background-image:url('doc.png');
+    background-position: 0px -4px;
+    background-repeat: repeat-y;
+    vertical-align:top;
+    display: inline-block;
+}
+
+table.directory {
+    font: 400 14px Roboto,sans-serif;
+}
+
+/* @end */
+
+div.dynheader {
+        margin-top: 8px;
+	-webkit-touch-callout: none;
+	-webkit-user-select: none;
+	-khtml-user-select: none;
+	-moz-user-select: none;
+	-ms-user-select: none;
+	user-select: none;
+}
+
+address {
+	font-style: normal;
+	color: #2A3D61;
+}
+
+table.doxtable caption {
+	caption-side: top;
+}
+
+table.doxtable {
+	border-collapse:collapse;
+        margin-top: 4px;
+        margin-bottom: 4px;
+}
+
+table.doxtable td, table.doxtable th {
+	border: 1px solid #2D4068;
+	padding: 3px 7px 2px;
+}
+
+table.doxtable th {
+	background-color: #374F7F;
+	color: #FFFFFF;
+	font-size: 110%;
+	padding-bottom: 4px;
+	padding-top: 5px;
+}
+
+table.fieldtable {
+        /*width: 100%;*/
+        margin-bottom: 10px;
+        border: 1px solid #A8B8D9;
+        border-spacing: 0px;
+        -moz-border-radius: 4px;
+        -webkit-border-radius: 4px;
+        border-radius: 4px;
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
+        -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
+        box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
+}
+
+.fieldtable td, .fieldtable th {
+        padding: 3px 7px 2px;
+}
+
+.fieldtable td.fieldtype, .fieldtable td.fieldname {
+        white-space: nowrap;
+        border-right: 1px solid #A8B8D9;
+        border-bottom: 1px solid #A8B8D9;
+        vertical-align: top;
+}
+
+.fieldtable td.fieldname {
+        padding-top: 3px;
+}
+
+.fieldtable td.fielddoc {
+        border-bottom: 1px solid #A8B8D9;
+        /*width: 100%;*/
+}
+
+.fieldtable td.fielddoc p:first-child {
+        margin-top: 0px;
+}       
+        
+.fieldtable td.fielddoc p:last-child {
+        margin-bottom: 2px;
+}
+
+.fieldtable tr:last-child td {
+        border-bottom: none;
+}
+
+.fieldtable th {
+        background-image:url('nav_f.png');
+        background-repeat:repeat-x;
+        background-color: #E2E8F2;
+        font-size: 90%;
+        color: #253555;
+        padding-bottom: 4px;
+        padding-top: 5px;
+        text-align:left;
+        -moz-border-radius-topleft: 4px;
+        -moz-border-radius-topright: 4px;
+        -webkit-border-top-left-radius: 4px;
+        -webkit-border-top-right-radius: 4px;
+        border-top-left-radius: 4px;
+        border-top-right-radius: 4px;
+        border-bottom: 1px solid #A8B8D9;
+}
+
+
+.tabsearch {
+	top: 0px;
+	left: 10px;
+	height: 36px;
+	background-image: url('tab_b.png');
+	z-index: 101;
+	overflow: hidden;
+	font-size: 13px;
+}
+
+.navpath ul
+{
+	font-size: 11px;
+	background-image:url('tab_b.png');
+	background-repeat:repeat-x;
+	background-position: 0 -5px;
+	height:30px;
+	line-height:30px;
+	color:#8AA0CC;
+	border:solid 1px #C2CDE4;
+	overflow:hidden;
+	margin:0px;
+	padding:0px;
+}
+
+.navpath li
+{
+	list-style-type:none;
+	float:left;
+	padding-left:10px;
+	padding-right:15px;
+	background-image:url('bc_s.png');
+	background-repeat:no-repeat;
+	background-position:right;
+	color:#364D7C;
+}
+
+.navpath li.navelem a
+{
+	height:32px;
+	display:block;
+	text-decoration: none;
+	outline: none;
+	color: #283A5D;
+	font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
+	text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
+	text-decoration: none;        
+}
+
+.navpath li.navelem a:hover
+{
+	color:#6884BD;
+}
+
+.navpath li.footer
+{
+        list-style-type:none;
+        float:right;
+        padding-left:10px;
+        padding-right:15px;
+        background-image:none;
+        background-repeat:no-repeat;
+        background-position:right;
+        color:#364D7C;
+        font-size: 8pt;
+}
+
+
+div.summary
+{
+	float: right;
+	font-size: 8pt;
+	padding-right: 5px;
+	width: 50%;
+	text-align: right;
+}       
+
+div.summary a
+{
+	white-space: nowrap;
+}
+
+table.classindex
+{
+        margin: 10px;
+        white-space: nowrap;
+        margin-left: 3%;
+        margin-right: 3%;
+        width: 94%;
+        border: 0;
+        border-spacing: 0; 
+        padding: 0;
+}
+
+div.ingroups
+{
+	font-size: 8pt;
+	width: 50%;
+	text-align: left;
+}
+
+div.ingroups a
+{
+	white-space: nowrap;
+}
+
+div.header
+{
+        background-image:url('nav_h.png');
+        background-repeat:repeat-x;
+	background-color: #F9FAFC;
+	margin:  0px;
+	border-bottom: 1px solid #C4CFE5;
+}
+
+div.headertitle
+{
+	padding: 5px 5px 5px 10px;
+}
+
+dl
+{
+        padding: 0 0 0 10px;
+}
+
+/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */
+dl.section
+{
+	margin-left: 0px;
+	padding-left: 0px;
+}
+
+dl.note
+{
+        margin-left:-7px;
+        padding-left: 3px;
+        border-left:4px solid;
+        border-color: #D0C000;
+}
+
+dl.warning, dl.attention
+{
+        margin-left:-7px;
+        padding-left: 3px;
+        border-left:4px solid;
+        border-color: #FF0000;
+}
+
+dl.pre, dl.post, dl.invariant
+{
+        margin-left:-7px;
+        padding-left: 3px;
+        border-left:4px solid;
+        border-color: #00D000;
+}
+
+dl.deprecated
+{
+        margin-left:-7px;
+        padding-left: 3px;
+        border-left:4px solid;
+        border-color: #505050;
+}
+
+dl.todo
+{
+        margin-left:-7px;
+        padding-left: 3px;
+        border-left:4px solid;
+        border-color: #00C0E0;
+}
+
+dl.test
+{
+        margin-left:-7px;
+        padding-left: 3px;
+        border-left:4px solid;
+        border-color: #3030E0;
+}
+
+dl.bug
+{
+        margin-left:-7px;
+        padding-left: 3px;
+        border-left:4px solid;
+        border-color: #C08050;
+}
+
+dl.section dd {
+	margin-bottom: 6px;
+}
+
+
+#projectlogo
+{
+	text-align: center;
+	vertical-align: bottom;
+	border-collapse: separate;
+}
+ 
+#projectlogo img
+{ 
+	border: 0px none;
+}
+ 
+#projectalign
+{
+        vertical-align: middle;
+}
+
+#projectname
+{
+	font: 300% Tahoma, Arial,sans-serif;
+	margin: 0px;
+	padding: 2px 0px;
+}
+    
+#projectbrief
+{
+	font: 120% Tahoma, Arial,sans-serif;
+	margin: 0px;
+	padding: 0px;
+}
+
+#projectnumber
+{
+	font: 50% Tahoma, Arial,sans-serif;
+	margin: 0px;
+	padding: 0px;
+}
+
+#titlearea
+{
+	padding: 0px;
+	margin: 0px;
+	width: 100%;
+	border-bottom: 1px solid #5373B4;
+}
+
+.image
+{
+        text-align: center;
+}
+
+.dotgraph
+{
+        text-align: center;
+}
+
+.mscgraph
+{
+        text-align: center;
+}
+
+.diagraph
+{
+        text-align: center;
+}
+
+.caption
+{
+	font-weight: bold;
+}
+
+div.zoom
+{
+	border: 1px solid #90A5CE;
+}
+
+dl.citelist {
+        margin-bottom:50px;
+}
+
+dl.citelist dt {
+        color:#334975;
+        float:left;
+        font-weight:bold;
+        margin-right:10px;
+        padding:5px;
+}
+
+dl.citelist dd {
+        margin:2px 0;
+        padding:5px 0;
+}
+
+div.toc {
+        padding: 14px 25px;
+        background-color: #F4F6FA;
+        border: 1px solid #D8DFEE;
+        border-radius: 7px 7px 7px 7px;
+        float: right;
+        height: auto;
+        margin: 0 8px 10px 10px;
+        width: 200px;
+}
+
+div.toc li {
+        background: url("bdwn.png") no-repeat scroll 0 5px transparent;
+        font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif;
+        margin-top: 5px;
+        padding-left: 10px;
+        padding-top: 2px;
+}
+
+div.toc h3 {
+        font: bold 12px/1.2 Arial,FreeSans,sans-serif;
+	color: #4665A2;
+        border-bottom: 0 none;
+        margin: 0;
+}
+
+div.toc ul {
+        list-style: none outside none;
+        border: medium none;
+        padding: 0px;
+}       
+
+div.toc li.level1 {
+        margin-left: 0px;
+}
+
+div.toc li.level2 {
+        margin-left: 15px;
+}
+
+div.toc li.level3 {
+        margin-left: 30px;
+}
+
+div.toc li.level4 {
+        margin-left: 45px;
+}
+
+.inherit_header {
+        font-weight: bold;
+        color: gray;
+        cursor: pointer;
+	-webkit-touch-callout: none;
+	-webkit-user-select: none;
+	-khtml-user-select: none;
+	-moz-user-select: none;
+	-ms-user-select: none;
+	user-select: none;
+}
+
+.inherit_header td {
+        padding: 6px 0px 2px 5px;
+}
+
+.inherit {
+        display: none;
+}
+
+tr.heading h2 {
+        margin-top: 12px;
+        margin-bottom: 4px;
+}
+
+/* tooltip related style info */
+
+.ttc {
+        position: absolute;
+        display: none;
+}
+
+#powerTip {
+	cursor: default;
+	white-space: nowrap;
+	background-color: white;
+	border: 1px solid gray;
+	border-radius: 4px 4px 4px 4px;
+	box-shadow: 1px 1px 7px gray;
+	display: none;
+	font-size: smaller;
+	max-width: 80%;
+	opacity: 0.9;
+	padding: 1ex 1em 1em;
+	position: absolute;
+	z-index: 2147483647;
+}
+
+#powerTip div.ttdoc {
+        color: grey;
+	font-style: italic;
+}
+
+#powerTip div.ttname a {
+        font-weight: bold;
+}
+
+#powerTip div.ttname {
+        font-weight: bold;
+}
+
+#powerTip div.ttdeci {
+        color: #006318;
+}
+
+#powerTip div {
+        margin: 0px;
+        padding: 0px;
+        font: 12px/16px Roboto,sans-serif;
+}
+
+#powerTip:before, #powerTip:after {
+	content: "";
+	position: absolute;
+	margin: 0px;
+}
+
+#powerTip.n:after,  #powerTip.n:before,
+#powerTip.s:after,  #powerTip.s:before,
+#powerTip.w:after,  #powerTip.w:before,
+#powerTip.e:after,  #powerTip.e:before,
+#powerTip.ne:after, #powerTip.ne:before,
+#powerTip.se:after, #powerTip.se:before,
+#powerTip.nw:after, #powerTip.nw:before,
+#powerTip.sw:after, #powerTip.sw:before {
+	border: solid transparent;
+	content: " ";
+	height: 0;
+	width: 0;
+	position: absolute;
+}
+
+#powerTip.n:after,  #powerTip.s:after,
+#powerTip.w:after,  #powerTip.e:after,
+#powerTip.nw:after, #powerTip.ne:after,
+#powerTip.sw:after, #powerTip.se:after {
+	border-color: rgba(255, 255, 255, 0);
+}
+
+#powerTip.n:before,  #powerTip.s:before,
+#powerTip.w:before,  #powerTip.e:before,
+#powerTip.nw:before, #powerTip.ne:before,
+#powerTip.sw:before, #powerTip.se:before {
+	border-color: rgba(128, 128, 128, 0);
+}
+
+#powerTip.n:after,  #powerTip.n:before,
+#powerTip.ne:after, #powerTip.ne:before,
+#powerTip.nw:after, #powerTip.nw:before {
+	top: 100%;
+}
+
+#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after {
+	border-top-color: #ffffff;
+	border-width: 10px;
+	margin: 0px -10px;
+}
+#powerTip.n:before {
+	border-top-color: #808080;
+	border-width: 11px;
+	margin: 0px -11px;
+}
+#powerTip.n:after, #powerTip.n:before {
+	left: 50%;
+}
+
+#powerTip.nw:after, #powerTip.nw:before {
+	right: 14px;
+}
+
+#powerTip.ne:after, #powerTip.ne:before {
+	left: 14px;
+}
+
+#powerTip.s:after,  #powerTip.s:before,
+#powerTip.se:after, #powerTip.se:before,
+#powerTip.sw:after, #powerTip.sw:before {
+	bottom: 100%;
+}
+
+#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after {
+	border-bottom-color: #ffffff;
+	border-width: 10px;
+	margin: 0px -10px;
+}
+
+#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before {
+	border-bottom-color: #808080;
+	border-width: 11px;
+	margin: 0px -11px;
+}
+
+#powerTip.s:after, #powerTip.s:before {
+	left: 50%;
+}
+
+#powerTip.sw:after, #powerTip.sw:before {
+	right: 14px;
+}
+
+#powerTip.se:after, #powerTip.se:before {
+	left: 14px;
+}
+
+#powerTip.e:after, #powerTip.e:before {
+	left: 100%;
+}
+#powerTip.e:after {
+	border-left-color: #ffffff;
+	border-width: 10px;
+	top: 50%;
+	margin-top: -10px;
+}
+#powerTip.e:before {
+	border-left-color: #808080;
+	border-width: 11px;
+	top: 50%;
+	margin-top: -11px;
+}
+
+#powerTip.w:after, #powerTip.w:before {
+	right: 100%;
+}
+#powerTip.w:after {
+	border-right-color: #ffffff;
+	border-width: 10px;
+	top: 50%;
+	margin-top: -10px;
+}
+#powerTip.w:before {
+	border-right-color: #808080;
+	border-width: 11px;
+	top: 50%;
+	margin-top: -11px;
+}
+
+@media print
+{
+  #top { display: none; }
+  #side-nav { display: none; }
+  #nav-path { display: none; }
+  body { overflow:visible; }
+  h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
+  .summary { display: none; }
+  .memitem { page-break-inside: avoid; }
+  #doc-content
+  {
+    margin-left:0 !important;
+    height:auto !important;
+    width:auto !important;
+    overflow:inherit;
+    display:inline;
+  }
+}
+
diff --git a/test-framework/docs/doxygen.png b/test-framework/docs/doxygen.png
new file mode 100644
index 0000000000000000000000000000000000000000..3ff17d807fd8aa003bed8bb2a69e8f0909592fd1
GIT binary patch
literal 3779
zcmV;!4m|ORP)<h;3K|Lk000e1NJLTq003wJ0018d1^@s63p<F|000h(Nkl<ZcmeHQ
zd0ds%x_&e@B~(leQIt>tMIv#Q0*~7<F|l1ZVT5-RDygU_D&hbl1PO?G!02E&AgGC=
zZN)5-^5BGUBqbS?oI>*`IBSO7_x;@a8#Zk6_PeKR_s92J&)(m+);m9Iz3blw)z#Gi
zP!9lj4$%+*>Hz@HCmM9L9|8c+0u=!H$O3?R0Kgx|#WP<6fKfC8fM-CQZT|_r@`>VO
zX^Hgb|9cJqpdJA5$MCEK`F_2@2Y@s>^+;pF`~jdI0Pvr|vl4`=C)EH@1IFe7pdJ8F
zH(qGi004~QnF)Ggga~8v08kGAs2hKTATxr7pwfNk|4#_AaT>w8P6TV+R2kbS$v==}
zAjf`s0g#V8lB+b3)5oEI*q+{Yt$MZDruD2^;$+(_%Qn+%v0X-bJO=;@kiJ^ygLBnC
z?1OVv_%aex1<B=i>M@jKU|Z~$eI?PoF4Vj>f<jDMm<J9Y`yoa+TL}}nh1XOW>Dzyo
zAiLfpXY*a<I(D9QKZkbcV%budKX>^Sj-S5D0S3@#V$sRW)g)_1e#$%8xdM>Jm7?!h
zu0P2X=xoN>^!4DoPRgph2(2va07yfpXF+<E#%$BN8?9&2`XF7LYR>WH7EOg1GY%Zn
z7~1A<(z7Q$ktEXhW_?GMpHp9l_UL18F3KOsxu81pqoBiNbFSGsof<JcynBP?5;;Hj
z5&eaFaU9!r?$Z!yiA0iczsm`lZQ1Q_f!pH!Vb=UbaniMS2h4rH7k+#41ORG)=X>-W
z6~eloMoz=4?OOnl2J268x5rOY`dCk0us(u<ZFT0vzGbA7HOqUbO4YBUD4VpaA7aAi
z`;yHWY}3Vkp6~i#=>S#Ud4yqOr@?=Q57a}tit|BhY>}~frH1sP`ScHS_d)oqH^lYy
zZ%VP`#10MlE~P?cE(%(#(AUSv_T{+;t@$U}El}(1ig`vZo`Rm;+5&(AYzJ^Ae=h2X
z@Re%vH<EH?l6o;YyW^)wNA36}ocwXH@B9yX*N9`RUu$0?DW6D6ZqU(wh|t!U;k4w{
zH3|#>wZU<K8~-&UxVP@$khUv1RFND27=jD%j`vdBxN>>|f0NI&%$*4eJ<o-E@WY``
zqsV5Uq0M(^e2$XbFQVQY6A&05BoX(oqU-Sbz&pR-sMeX{(#EY_uNvG}BHk}N3y1ea
z&)~4V{6c-_c}Yb90AmPVmxDc9RtA&ZXtL`~<RoleJ4+E0`>weC5OROQrpPMA@*w|o
z()A==l}(@bv^&>H1Ob3C=<^|hob?0+xJ?QQ3-ueQC}zy&JQNib!OqSO@-=>XzxlSF
zAZ^U*1l6EEmg3r};_HY>&Jo_{dOPEFTWPmt=U&F#+0(O59^UIlHbNX+eF8UzyDR*T
z(=5X$VF3!gm@RooS-&iiUYGG^`hMR(07zr_xP`d!^BH?uD>Phl8Rdifx3Af^Zr`Ku
ztL+~HkVeL#bJ)7;`=>;{KNRvjmc}1}c58Sr#Treq=4{xo!ATy|c>iRSp4`dzMMVd@
zL8?uwXDY}Wqgh4mH`|$BTXpUIu6A1-cSq%hJw;@^Zr8TP=GMh*p(m(tN7@!^D~sl$
zz^tf4II4|};+irE$Fnm4NTc5%p{PRA`%}Zk`CE5?#h3|xcyQ<Xbb-O<Z4>sS#iONZ
z6H(@^i9td!$z~bZiJLTax$o>r(p}3o<nje2|Avo`h6^!)bS{!kN^oebdd#5CQZW;b
zA~P)_xQB}-?DMcO;{2ZM^9Wlyhwp^EkrNh$g-#zJZI+W)Fn_KeU+CPzoDA3XHu>@<
zyD7%(>ZYvy=6$U3e!F{Z`uSaYy`xQyl?b{}eg|G3&fz*`QH@mDUn)1%#5u`0m$%D}
z?;tZ0u(mWeMV0QtzjgN!lT*pNRj;6510Wwx?Yi_=tYw|J#7@(Xe7ifDzXuK;JB;QO
z#bg~K$cgm$@{QiL_3yr}y&~wuv=P=#O&Tj=Sr)aCUlYmZMcw?)T?c<qySZ3PfzX|h
zNxj~sZx=;8Umdw9ghf!XjC^g!!4jbxk=-nc)2X_;TCvXGx~JD`-7FPr%}ttM#Q243
zdSwWYRlDX2nZa}#Gt<Dmm^PQv_W8@V1ahd2xzT--lXvzyozAEE>%0rUe1cS+o!qs_
zQ6Gp)-{)V!;=q}llyK3|^WeLKyjf%y;xHku;9(vM!j|~<7w1<b9>c*Mk-;P{T&yG)
z@C-8E?QPynNQ<8f01D`2qexcVEIOU?y}MG)TAE6&VT5`rK8s(4PE;uQ92LTXUQ<>^
ztyQ@=@kRdh@ebUG^Z6NWWIL;_IGJ2ST>$t!$m$qvtj0Qmw8moN6GUV^!Q<bah>KNK
zHBXCtUH<T{Q0VG*iQ!ybGT-d~B6-ML?|B@`9jAJuXM0(zdxXQ88~8P;7XLeUe|t_d
z>8)<!#He?t!J^GeqTQ|g&oVhlWWSQ^3wbH*P~P%5jK!(1iLn|0Ky6Ue@po!$EH;54
z;b>RY9++gH_TUV4^=-j$t}dD3qsN7GclJ^Zc&(j6&a_!$jCf}%c5ey`pm~1)@{yI3
zTdWyB+*X{JFw#z;PwRr5evb2!ueWF;v`B0HoUu4-(~aL=z;OXUUEtG`_$)Oxw6FKg
zEzY`CyKaSBK3xt#8gA|r_|Kehn_HYVBMpEwbn9-fI*!u*eTA1ef8<m-U!GYcFSJLJ
zOPLuMsUG=;l_>Mkl1=!jV4oYwWYM}i`A>_F4nhmlCIC<a0TFv~_Gn5J$t&6%>6WLa
zY%;4&@AlnaG11ejl61Jev21|r*m+?Kru3;1tFDl}#!OzUp6c<MxE}d=F238nid!5E
zbuV4Li)mAR_zs;;KC)#onQ@0|X4)pAsc9QjTs>>go4{C|^erwpG*&h6bs<zmjhG<*
zE{sn|w6-*tdUsTEE)MUBrppa@^|iO0)`UpL`5B|0$bS|TNcm?8(P;6KR3zVdakzT^
zsBpiu>pUPJag}oOkN2912Y3I?(eRc@U9>z#HPBHC?nps7<lndN{fZB#2e8hBJ?W_#
zvKYcfdj<vgzAF_~|7`oJ7%A(QC6W9Love!T&>H5!zP``90!Q1n80jo+B3TWXp!8Pe
zwuKuLLI6l3Gv@+QH*Y}2wPLPQ1<z4ER5ty_VVXxzYOzIn{d_~;>^EZhT#+Ed8q8Wo
z1pTmIBxv14-{l&QVKxAyQF#8Q@NeJwWdKk>?cpiJLkJr+aZ!Me+Cfp!?FWSRf^j2k
z73BRR{WSKaMkJ>1Nbx5dan5hg^_}O{Tj6u%iV%#QGz0Q@j{R^Ik)Z*+(<hQHpK6Z5
zi8eq^eB?|3P+;Mzy(m7G=1H>YvY2ziBG)?AmJa|JV%4UT$k`hcOg5r9R?5>?o~JzK
zJCrj&{i#hG>N7!B4kNX(%igb%kDj0fOQThC-8mtfap82PNRXr1D>lbgg)dYTQ(kbx
z`Ee5kXG~Bh+BHQBf|kJEy6(ga%Wfhvd<CBbJFZu|&ix|RtW*|v*5b8v`i@U0n+f47
zSD?cyrs7)6mOLEQ#wKo0-7FqSilZ<#F2PzZ$MO33Xevog+LBLYy~$@nSkTm3^W^yC
zIq3WalbvYN?L<?79-5^ZkD<zq3;?x3uP+ePW4QK{U>QNDuOfQoe377l#h<A9J4gi0
z4<mxkd?gaZPl$u7PvFeS1JK+=3Z4yZ-0&IVW0nAr#-z!@ac#DB%O-yJZu-*838Tl)
zfLhfR0BRsTs}x^uTZf1DZceAq-6UVWVnvvOfYmAaIKDqNk!<>t&DrMGeIsI5C<&ai
zWG$|hop2@@q5YDa)_-A?B02W;#fH!%k`daQLEItaJJ8Yf1L%8x;kg?)k)00P-lH+w
z)5$QNV6r2$YtnV(4o=0^3{kmaXn*Dm0F*fU(@o)yVVjk|ln8ea6BMy%vZAhW9|wvA
z8RoDkVoMEz1d>|5(k0Nw>22ZT){V<3$^C-cN+|~hKt2)){+l-?3m@-$c?-dlzQ)q-
zZ)j%n^gerV{|+t}9m1_&&Ly!9$rtG4XX|WQ8`xYzGC~U@nYh~g(z<YhXx*Cp6|P&Q
z+&qgTQ*iOjK{t})*a1j`bTm4jd}pY1(@eH1C?v+IyX*vouKAMl_ar-Fo7CB0J+`B!
zO@tRs%)~YFtGCC#lSsGBNG`mdNCagNLGHRWeLO;*wB~O}5I-EeTKCSz6~O^ejO66c
z0Z7B!dkX8bBYo7B91O_`fdat)7RXmXui^e-vnKTv=YIa>9)bdAl#xH)xd5a=@|qql
z|FzEil{P5(@gy!4ek05i$>`E^G~{;pnf6ftpLh$h#W?^#4UkPfa;;?bsIe&kz!+40
zI|6`F2n020)-r`pFaZ38F!S-lJM-o&inOw|66=GMeP@xQU5ghQH{~5Uh~TMTd;I9`
z>YhVB`e^EVj*S7JF39ZgNf}A-0DwOcTT63ydN$I3b?yBQtUI*_fae~kPvzoD$zjX3
zoqBe#>12im4WzZ=f^4+u=!lA|#r%1`WB0-6*3BL#at`47#ebPpR|D1b)3BjT34nYY
z%Ds%d?5$|{LgOIaRO{{oC&RK`O91$fqwM0(C_TALcozu*fWHb%%q&p-q{_8*2Zsi^
zh1ZCnr^UYa;4vQEtHk{~zi>wwMC5o{S=$P0X681y`SXwFH?Ewn{x-MOZynmc)JT5v
zuHLwh;tLfxRrr%|k370}GofLl7thg>ACWWY&msqaVu&ry+`7+Ss>NL^%T1|z{IGMA
zW-SKl=V-^{(f!Kf^#3(|T2W47d(%JVCI4JgRrT1pNz>+ietmFToNv^`gzC@&O-)+i
zPQ~RwK8%C_vf%;%e>NyTp~dM5;!C|N0Q^6|CEb7Bw=Vz~$1#FA;Z*?mKSC)Hl-20s
t8QyHj(g6VK0RYbl8UjE)0O0w=e*@m04r>stuEhWV002ovPDHLkV1hl;dM*F}

literal 0
HcmV?d00001

diff --git a/test-framework/docs/dynsections.js b/test-framework/docs/dynsections.js
new file mode 100644
index 000000000..85e183690
--- /dev/null
+++ b/test-framework/docs/dynsections.js
@@ -0,0 +1,97 @@
+function toggleVisibility(linkObj)
+{
+ var base = $(linkObj).attr('id');
+ var summary = $('#'+base+'-summary');
+ var content = $('#'+base+'-content');
+ var trigger = $('#'+base+'-trigger');
+ var src=$(trigger).attr('src');
+ if (content.is(':visible')===true) {
+   content.hide();
+   summary.show();
+   $(linkObj).addClass('closed').removeClass('opened');
+   $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
+ } else {
+   content.show();
+   summary.hide();
+   $(linkObj).removeClass('closed').addClass('opened');
+   $(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
+ } 
+ return false;
+}
+
+function updateStripes()
+{
+  $('table.directory tr').
+       removeClass('even').filter(':visible:even').addClass('even');
+}
+
+function toggleLevel(level)
+{
+  $('table.directory tr').each(function() {
+    var l = this.id.split('_').length-1;
+    var i = $('#img'+this.id.substring(3));
+    var a = $('#arr'+this.id.substring(3));
+    if (l<level+1) {
+      i.removeClass('iconfopen iconfclosed').addClass('iconfopen');
+      a.html('&#9660;');
+      $(this).show();
+    } else if (l==level+1) {
+      i.removeClass('iconfclosed iconfopen').addClass('iconfclosed');
+      a.html('&#9658;');
+      $(this).show();
+    } else {
+      $(this).hide();
+    }
+  });
+  updateStripes();
+}
+
+function toggleFolder(id)
+{
+  // the clicked row
+  var currentRow = $('#row_'+id);
+
+  // all rows after the clicked row
+  var rows = currentRow.nextAll("tr");
+
+  var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
+
+  // only match elements AFTER this one (can't hide elements before)
+  var childRows = rows.filter(function() { return this.id.match(re); });
+
+  // first row is visible we are HIDING
+  if (childRows.filter(':first').is(':visible')===true) {
+    // replace down arrow by right arrow for current row
+    var currentRowSpans = currentRow.find("span");
+    currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
+    currentRowSpans.filter(".arrow").html('&#9658;');
+    rows.filter("[id^=row_"+id+"]").hide(); // hide all children
+  } else { // we are SHOWING
+    // replace right arrow by down arrow for current row
+    var currentRowSpans = currentRow.find("span");
+    currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen");
+    currentRowSpans.filter(".arrow").html('&#9660;');
+    // replace down arrows by right arrows for child rows
+    var childRowsSpans = childRows.find("span");
+    childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
+    childRowsSpans.filter(".arrow").html('&#9658;');
+    childRows.show(); //show all children
+  }
+  updateStripes();
+}
+
+
+function toggleInherit(id)
+{
+  var rows = $('tr.inherit.'+id);
+  var img = $('tr.inherit_header.'+id+' img');
+  var src = $(img).attr('src');
+  if (rows.filter(':first').is(':visible')===true) {
+    rows.css('display','none');
+    $(img).attr('src',src.substring(0,src.length-8)+'closed.png');
+  } else {
+    rows.css('display','table-row'); // using show() causes jump in firefox
+    $(img).attr('src',src.substring(0,src.length-10)+'open.png');
+  }
+}
+
diff --git a/test-framework/docs/files.html b/test-framework/docs/files.html
new file mode 100644
index 000000000..7e04bc525
--- /dev/null
+++ b/test-framework/docs/files.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<title>LibDap-test: File List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+  $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">LibDap-test
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.11 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+  <div id="navrow2" class="tabs2">
+    <ul class="tablist">
+      <li class="current"><a href="files.html"><span>File&#160;List</span></a></li>
+      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
+    </ul>
+  </div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="header">
+  <div class="headertitle">
+<div class="title">File List</div>  </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock">Here is a list of all files with brief descriptions:</div><div class="directory">
+<table class="directory">
+<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="dap__test_8c.html" target="_self">dap_test.c</a></td><td class="desc"></td></tr>
+<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><a href="dap__test_8h_source.html"><span class="icondoc"></span></a><a class="el" href="dap__test_8h.html" target="_self">dap_test.h</a></td><td class="desc"></td></tr>
+<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="dap__test__generator_8c.html" target="_self">dap_test_generator.c</a></td><td class="desc"></td></tr>
+<tr id="row_3_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><a href="dap__test__generator_8h_source.html"><span class="icondoc"></span></a><a class="el" href="dap__test__generator_8h.html" target="_self">dap_test_generator.h</a></td><td class="desc"></td></tr>
+</table>
+</div><!-- directory -->
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.11
+</small></address>
+</body>
+</html>
diff --git a/test-framework/docs/folderclosed.png b/test-framework/docs/folderclosed.png
new file mode 100644
index 0000000000000000000000000000000000000000..bb8ab35edce8e97554e360005ee9fc5bffb36e66
GIT binary patch
literal 616
zcmV-u0+;=XP)<h;3K|Lk000e1NJLTq000;O000&U1^@s6+I?Jz0006nNkl<ZcmeHQ
zO;6N77=GINb=Z(>a9#ETzayK)T~Jw&MMH>OIr#&;dC}is*2Mqdf&akCc=O@`qC+4i
z5Iu3w#1M@KqXCz8TIZd1wli&kkl2HVcAiZ8PUn5z_kG@-y;?yK06=cA0U%H0PH+kU
zl6dp}OR(|r8-RG+YLu`zbI}5TlOU6ToR41{9=uz^?dGTNL;wIMf|V3`d1Wj3y!#6`
zBLZ?xpKR~^2x}?~zA(_NUu3IaDB$tKma*XUdOZN~c=dLt_h_k!dbxm_*ibDM<n!c>
zlFX`g{k$X}yIe%$N)cn1LNu=q<K5OS7CNKPk1f&9-+dXiicCfAy8a*|m;2$mAHWmO
zXHGi+kV1-pHt+rM<gA>9_CS)*<?(PP8<}W6a5(^^keLBRMb50K&dQM@pmn94ZU=xQ
zQX)TlxfVQ_9);_LB~VUu;v|U_-?p*(;VWJ|=^7%ZGN6sBL~)dHv|OyK(wPKdmH>>A
zsX_mM4<gjHpqc8Q=uo450T?4i;CdW;`z|<XAntIp>L@`(cSNQKMFc$RtYbx{79<Tw
zWXi-A43v#7I@t_Ijx7TKV2n(H{k|uniNrjlLmWw}y*t^*R9a-QX?;6B==9%$de=Kk
z*QYpi761&SjtX%clomR5cK>#j-J7hk*>*+ZZhM4Hw?<fJyv$}=71o`ou(^pUn-ky6
z->I?rsXCi#mRWJ=-0LGV5a-WR0Qgt<|Nqf)C-@80`5gIz45^_20000<MNUMnLSTaR
CZX#j;

literal 0
HcmV?d00001

diff --git a/test-framework/docs/folderopen.png b/test-framework/docs/folderopen.png
new file mode 100644
index 0000000000000000000000000000000000000000..d6c7f676a3b3ef8c2c307d319dff3c6a604eb227
GIT binary patch
literal 597
zcmV-b0;>IqP)<h;3K|Lk000e1NJLTq000;O000&U1^@s6+I?Jz0006UNkl<ZcmeHQ
zKX21e5dS%8nlx#!9XpK>X=#(TiCT&PiIIVc55T}TU}EUh*{q$|`3@{d>{Tc9Bo>e=
zfmF3!f>fbI9#GoEHh0f`i5)wkLpva0ztf%HpZneK?w-7AK@b4Itw{y|Zd3k!fH?q2
zlhckHd_V2M_X7+)U&_Xcfvtw60l;--DgZmLSw-Y?S>)zIqMyJ1#FwLU*%bl38ok+!
zh78H87n`ZTS;uhzAR$M`zZ`bVhq=+%u9^$5jDplgxd44}9;IRqUH1YHH|@6oFe%z(
zo4)_>E$F&^P-f(#)>(TrnbE>Pefs9~@iN=|)Rz|V`sGfHNrJ)0gJb8xx+SBmRf@1l
zvuzt=vGfI)<-F9!o&3l?>9~0QbUDT(wFdnQPv%xdD)m*g%!20>Bc9iYmGAp<9YAa(
z0QgY<a!3GSVHw98r3tc|WLmCr=#k@b07--d0B^h;_*7huEOe@B5HbiIMnQNV2X-w6
zOrIHW*Nh!-3RJ{NFA7|xb7mLqy*mtQR%uj&==!8@USn{@{Ji@c`@7F#U6jIrqNF?z
zhGG8IoU)VO(*u}!lcNr&IgdJw?)fXgkFy?t@!%{)3!Y}PHt9|Ph>gTWqf1qN++Gqp
z8@AYPTB3E|6s=WLG?xw0tm|U!o=&zd+H0oRYE;Dbx+Na9s^STqX|Gnq%H8s(nGDGJ
j8vwW|`Ts`)fSK|Kx=IK@RG@g200000NkvXXu0mjfauFEA

literal 0
HcmV?d00001

diff --git a/test-framework/docs/globals.html b/test-framework/docs/globals.html
new file mode 100644
index 000000000..73beae5c8
--- /dev/null
+++ b/test-framework/docs/globals.html
@@ -0,0 +1,159 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<title>LibDap-test: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+  $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">LibDap-test
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.11 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+  <div id="navrow2" class="tabs2">
+    <ul class="tablist">
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
+      <li class="current"><a href="globals.html"><span>File&#160;Members</span></a></li>
+    </ul>
+  </div>
+  <div id="navrow3" class="tabs2">
+    <ul class="tablist">
+      <li class="current"><a href="globals.html"><span>All</span></a></li>
+      <li><a href="globals_func.html"><span>Functions</span></a></li>
+      <li><a href="globals_defs.html"><span>Macros</span></a></li>
+    </ul>
+  </div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="contents">
+<div class="textblock">Here is a list of all file members with links to the files they belong to:</div><ul>
+<li>_printrepchar()
+: <a class="el" href="dap__test_8c.html#a1afe6d5bf13280151f2bfaae81ac8bab">dap_test.c</a>
+</li>
+<li>cmake_minimum_required()
+: <a class="el" href="CMakeLists_8txt.html#a2ed873368192cb7cc113ab2093062d06">CMakeLists.txt</a>
+</li>
+<li>dap_assert
+: <a class="el" href="dap__test_8h.html#aa32aee4a91979a0fabe22cacffe68d83">dap_test.h</a>
+</li>
+<li>dap_assert_PIF
+: <a class="el" href="dap__test_8h.html#ac37da94c545302fb83d887466c2fb5d0">dap_test.h</a>
+</li>
+<li>dap_dump_hex()
+: <a class="el" href="dap__test_8c.html#a2ea8cdd673adb86824a4dadc9d8301a0">dap_test.c</a>
+, <a class="el" href="dap__test_8h.html#a2ea8cdd673adb86824a4dadc9d8301a0">dap_test.h</a>
+</li>
+<li>dap_fail
+: <a class="el" href="dap__test_8h.html#a9802d055159d6b06eb7a34d06b1d4462">dap_test.h</a>
+</li>
+<li>dap_pass_msg
+: <a class="el" href="dap__test_8h.html#a4ac9860aafed5e1e68d19a71f70355b3">dap_test.h</a>
+</li>
+<li>dap_print_module_name
+: <a class="el" href="dap__test_8h.html#aea57bd01a18311666642532ef91407c0">dap_test.h</a>
+</li>
+<li>dap_test_msg
+: <a class="el" href="dap__test_8h.html#a1364daf3680e471ddfd1ac9567b887be">dap_test.h</a>
+</li>
+<li>generate_random_byte_array()
+: <a class="el" href="dap__test__generator_8c.html#a0c9716d317a4813249aeac91b40329a2">dap_test_generator.c</a>
+, <a class="el" href="dap__test__generator_8h.html#a0c9716d317a4813249aeac91b40329a2">dap_test_generator.h</a>
+</li>
+<li>MAX_PRINT_WIDTH
+: <a class="el" href="dap__test_8c.html#abd9e6255b7335bc41294be16a69db676">dap_test.c</a>
+</li>
+<li>TEXT_COLOR_BLU
+: <a class="el" href="dap__test_8h.html#a97de8572e888bea0f33efac1599a5308">dap_test.h</a>
+</li>
+<li>TEXT_COLOR_CYN
+: <a class="el" href="dap__test_8h.html#ad0ea07279d343f0fd5b1b1409e131240">dap_test.h</a>
+</li>
+<li>TEXT_COLOR_GRN
+: <a class="el" href="dap__test_8h.html#a3558e465da6a25d9ecd34818cdef0f38">dap_test.h</a>
+</li>
+<li>TEXT_COLOR_MAG
+: <a class="el" href="dap__test_8h.html#a6f533adddd363b4afff300c11dab3c41">dap_test.h</a>
+</li>
+<li>TEXT_COLOR_RED
+: <a class="el" href="dap__test_8h.html#ae6403a24bf4b19d1790870bdb77e0ff6">dap_test.h</a>
+</li>
+<li>TEXT_COLOR_RESET
+: <a class="el" href="dap__test_8h.html#a4588c5e18d03928f2a58e786d028e264">dap_test.h</a>
+</li>
+<li>TEXT_COLOR_WHT
+: <a class="el" href="dap__test_8h.html#abc00f35dba32197c9c85b1f9915ddb48">dap_test.h</a>
+</li>
+<li>TEXT_COLOR_YEL
+: <a class="el" href="dap__test_8h.html#a1a8ecbbb90c3fee647a485bb43735a0e">dap_test.h</a>
+</li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.11
+</small></address>
+</body>
+</html>
diff --git a/test-framework/docs/globals_defs.html b/test-framework/docs/globals_defs.html
new file mode 100644
index 000000000..992c72c33
--- /dev/null
+++ b/test-framework/docs/globals_defs.html
@@ -0,0 +1,145 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<title>LibDap-test: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+  $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">LibDap-test
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.11 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+  <div id="navrow2" class="tabs2">
+    <ul class="tablist">
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
+      <li class="current"><a href="globals.html"><span>File&#160;Members</span></a></li>
+    </ul>
+  </div>
+  <div id="navrow3" class="tabs2">
+    <ul class="tablist">
+      <li><a href="globals.html"><span>All</span></a></li>
+      <li><a href="globals_func.html"><span>Functions</span></a></li>
+      <li class="current"><a href="globals_defs.html"><span>Macros</span></a></li>
+    </ul>
+  </div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="contents">
+&#160;<ul>
+<li>dap_assert
+: <a class="el" href="dap__test_8h.html#aa32aee4a91979a0fabe22cacffe68d83">dap_test.h</a>
+</li>
+<li>dap_assert_PIF
+: <a class="el" href="dap__test_8h.html#ac37da94c545302fb83d887466c2fb5d0">dap_test.h</a>
+</li>
+<li>dap_fail
+: <a class="el" href="dap__test_8h.html#a9802d055159d6b06eb7a34d06b1d4462">dap_test.h</a>
+</li>
+<li>dap_pass_msg
+: <a class="el" href="dap__test_8h.html#a4ac9860aafed5e1e68d19a71f70355b3">dap_test.h</a>
+</li>
+<li>dap_print_module_name
+: <a class="el" href="dap__test_8h.html#aea57bd01a18311666642532ef91407c0">dap_test.h</a>
+</li>
+<li>dap_test_msg
+: <a class="el" href="dap__test_8h.html#a1364daf3680e471ddfd1ac9567b887be">dap_test.h</a>
+</li>
+<li>MAX_PRINT_WIDTH
+: <a class="el" href="dap__test_8c.html#abd9e6255b7335bc41294be16a69db676">dap_test.c</a>
+</li>
+<li>TEXT_COLOR_BLU
+: <a class="el" href="dap__test_8h.html#a97de8572e888bea0f33efac1599a5308">dap_test.h</a>
+</li>
+<li>TEXT_COLOR_CYN
+: <a class="el" href="dap__test_8h.html#ad0ea07279d343f0fd5b1b1409e131240">dap_test.h</a>
+</li>
+<li>TEXT_COLOR_GRN
+: <a class="el" href="dap__test_8h.html#a3558e465da6a25d9ecd34818cdef0f38">dap_test.h</a>
+</li>
+<li>TEXT_COLOR_MAG
+: <a class="el" href="dap__test_8h.html#a6f533adddd363b4afff300c11dab3c41">dap_test.h</a>
+</li>
+<li>TEXT_COLOR_RED
+: <a class="el" href="dap__test_8h.html#ae6403a24bf4b19d1790870bdb77e0ff6">dap_test.h</a>
+</li>
+<li>TEXT_COLOR_RESET
+: <a class="el" href="dap__test_8h.html#a4588c5e18d03928f2a58e786d028e264">dap_test.h</a>
+</li>
+<li>TEXT_COLOR_WHT
+: <a class="el" href="dap__test_8h.html#abc00f35dba32197c9c85b1f9915ddb48">dap_test.h</a>
+</li>
+<li>TEXT_COLOR_YEL
+: <a class="el" href="dap__test_8h.html#a1a8ecbbb90c3fee647a485bb43735a0e">dap_test.h</a>
+</li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.11
+</small></address>
+</body>
+</html>
diff --git a/test-framework/docs/globals_func.html b/test-framework/docs/globals_func.html
new file mode 100644
index 000000000..11b4ac752
--- /dev/null
+++ b/test-framework/docs/globals_func.html
@@ -0,0 +1,114 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<title>LibDap-test: File Members</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+  $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">LibDap-test
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.11 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
+      <li class="current"><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+  <div id="navrow2" class="tabs2">
+    <ul class="tablist">
+      <li><a href="files.html"><span>File&#160;List</span></a></li>
+      <li class="current"><a href="globals.html"><span>File&#160;Members</span></a></li>
+    </ul>
+  </div>
+  <div id="navrow3" class="tabs2">
+    <ul class="tablist">
+      <li><a href="globals.html"><span>All</span></a></li>
+      <li class="current"><a href="globals_func.html"><span>Functions</span></a></li>
+      <li><a href="globals_defs.html"><span>Macros</span></a></li>
+    </ul>
+  </div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="contents">
+&#160;<ul>
+<li>_printrepchar()
+: <a class="el" href="dap__test_8c.html#a1afe6d5bf13280151f2bfaae81ac8bab">dap_test.c</a>
+</li>
+<li>cmake_minimum_required()
+: <a class="el" href="CMakeLists_8txt.html#a2ed873368192cb7cc113ab2093062d06">CMakeLists.txt</a>
+</li>
+<li>dap_dump_hex()
+: <a class="el" href="dap__test_8c.html#a2ea8cdd673adb86824a4dadc9d8301a0">dap_test.c</a>
+, <a class="el" href="dap__test_8h.html#a2ea8cdd673adb86824a4dadc9d8301a0">dap_test.h</a>
+</li>
+<li>generate_random_byte_array()
+: <a class="el" href="dap__test__generator_8c.html#a0c9716d317a4813249aeac91b40329a2">dap_test_generator.c</a>
+, <a class="el" href="dap__test__generator_8h.html#a0c9716d317a4813249aeac91b40329a2">dap_test_generator.h</a>
+</li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.11
+</small></address>
+</body>
+</html>
diff --git a/test-framework/docs/graph_legend.dot b/test-framework/docs/graph_legend.dot
new file mode 100644
index 000000000..789df5672
--- /dev/null
+++ b/test-framework/docs/graph_legend.dot
@@ -0,0 +1,22 @@
+digraph "Graph Legend"
+{
+  edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"];
+  node [fontname="Helvetica",fontsize="10",shape=record];
+  Node9 [shape="box",label="Inherited",fontsize="10",height=0.2,width=0.4,fontname="Helvetica",fillcolor="grey75",style="filled" fontcolor="black"];
+  Node10 -> Node9 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node10 [shape="box",label="PublicBase",fontsize="10",height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classPublicBase.html"];
+  Node11 -> Node10 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node11 [shape="box",label="Truncated",fontsize="10",height=0.2,width=0.4,fontname="Helvetica",color="red",URL="$classTruncated.html"];
+  Node13 -> Node9 [dir="back",color="darkgreen",fontsize="10",style="solid",fontname="Helvetica"];
+  Node13 [shape="box",label="ProtectedBase",fontsize="10",height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classProtectedBase.html"];
+  Node14 -> Node9 [dir="back",color="firebrick4",fontsize="10",style="solid",fontname="Helvetica"];
+  Node14 [shape="box",label="PrivateBase",fontsize="10",height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classPrivateBase.html"];
+  Node15 -> Node9 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node15 [shape="box",label="Undocumented",fontsize="10",height=0.2,width=0.4,fontname="Helvetica",color="grey75"];
+  Node16 -> Node9 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"];
+  Node16 [shape="box",label="Templ< int >",fontsize="10",height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classTempl.html"];
+  Node17 -> Node16 [dir="back",color="orange",fontsize="10",style="dashed",label="< int >",fontname="Helvetica"];
+  Node17 [shape="box",label="Templ< T >",fontsize="10",height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classTempl.html"];
+  Node18 -> Node9 [dir="back",color="darkorchid3",fontsize="10",style="dashed",label="m_usedClass",fontname="Helvetica"];
+  Node18 [shape="box",label="Used",fontsize="10",height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classUsed.html"];
+}
diff --git a/test-framework/docs/graph_legend.html b/test-framework/docs/graph_legend.html
new file mode 100644
index 000000000..4b0c3c8f1
--- /dev/null
+++ b/test-framework/docs/graph_legend.html
@@ -0,0 +1,118 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<title>LibDap-test: Graph Legend</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+  $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">LibDap-test
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.11 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
+      <li><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="header">
+  <div class="headertitle">
+<div class="title">Graph Legend</div>  </div>
+</div><!--header-->
+<div class="contents">
+<p>This page explains how to interpret the graphs that are generated by doxygen.</p>
+<p>Consider the following example: </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;/*! Invisible class because of truncation */</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;class Invisible { };</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;/*! Truncated class, inheritance relation is hidden */</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;class Truncated : public Invisible { };</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;/* Class not documented with doxygen comments */</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;class Undocumented { };</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;/*! Class that is inherited using public inheritance */</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;class PublicBase : public Truncated { };</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;/*! A template class */</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;template&lt;class T&gt; class Templ { };</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;/*! Class that is inherited using protected inheritance */</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;class ProtectedBase { };</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;/*! Class that is inherited using private inheritance */</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;class PrivateBase { };</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;/*! Class that is used by the Inherited class */</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;class Used { };</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;/*! Super class that inherits a number of other classes */</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;class Inherited : public PublicBase,</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;                  protected ProtectedBase,</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;                  private PrivateBase,</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;                  public Undocumented,</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;                  public Templ&lt;int&gt;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;{</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;  private:</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    Used *m_usedClass;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;};</div></div><!-- fragment --><p> This will result in the following graph:</p>
+<center><div class="image">
+<img src="graph_legend.png" />
+</div>
+</center><p>The boxes in the above graph have the following meaning: </p>
+<ul>
+<li>
+A filled gray box represents the struct or class for which the graph is generated. </li>
+<li>
+A box with a black border denotes a documented struct or class. </li>
+<li>
+A box with a gray border denotes an undocumented struct or class. </li>
+<li>
+A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries. </li>
+</ul>
+<p>The arrows have the following meaning: </p>
+<ul>
+<li>
+A dark blue arrow is used to visualize a public inheritance relation between two classes. </li>
+<li>
+A dark green arrow is used for protected inheritance. </li>
+<li>
+A dark red arrow is used for private inheritance. </li>
+<li>
+A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible. </li>
+<li>
+A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance. </li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.11
+</small></address>
+</body>
+</html>
diff --git a/test-framework/docs/graph_legend.md5 b/test-framework/docs/graph_legend.md5
new file mode 100644
index 000000000..a06ed050c
--- /dev/null
+++ b/test-framework/docs/graph_legend.md5
@@ -0,0 +1 @@
+387ff8eb65306fa251338d3c9bd7bfff
\ No newline at end of file
diff --git a/test-framework/docs/index.html b/test-framework/docs/index.html
new file mode 100644
index 000000000..bd7dfef54
--- /dev/null
+++ b/test-framework/docs/index.html
@@ -0,0 +1,89 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<title>LibDap-test: Main Page</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+  $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">LibDap-test
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.11 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li class="current"><a href="index.html"><span>Main&#160;Page</span></a></li>
+      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
+      <li><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="header">
+  <div class="headertitle">
+<div class="title">LibDap-test Documentation</div>  </div>
+</div><!--header-->
+<div class="contents">
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.11
+</small></address>
+</body>
+</html>
diff --git a/test-framework/docs/jquery.js b/test-framework/docs/jquery.js
new file mode 100644
index 000000000..d52a1c775
--- /dev/null
+++ b/test-framework/docs/jquery.js
@@ -0,0 +1,68 @@
+/*
+ * jQuery JavaScript Library v1.7.1
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Mon Nov 21 21:11:03 2011 -0500
+ */
+(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b4<b3;b4++){if((b9=arguments[b4])!=null){for(b2 in b9){b0=b5[b2];b1=b9[b2];if(b5===b1){continue}if(b8&&b1&&(bF.isPlainObject(b1)||(b6=bF.isArray(b1)))){if(b6){b6=false;b7=b0&&bF.isArray(b0)?b0:[]}else{b7=b0&&bF.isPlainObject(b0)?b0:{}}b5[b2]=bF.extend(b8,b7,b1)}else{if(b1!==L){b5[b2]=b1}}}}}return b5};bF.extend({noConflict:function(b0){if(bb.$===bF){bb.$=bH}if(b0&&bb.jQuery===bF){bb.jQuery=bU}return bF},isReady:false,readyWait:1,holdReady:function(b0){if(b0){bF.readyWait++}else{bF.ready(true)}},ready:function(b0){if((b0===true&&!--bF.readyWait)||(b0!==true&&!bF.isReady)){if(!av.body){return setTimeout(bF.ready,1)}bF.isReady=true;if(b0!==true&&--bF.readyWait>0){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b4<b5;){if(b6.apply(b3[b4++],b2)===false){break}}}}else{if(b0){for(b1 in b3){if(b6.call(b3[b1],b1,b3[b1])===false){break}}}else{for(;b4<b5;){if(b6.call(b3[b4],b4,b3[b4++])===false){break}}}}return b3},trim:bO?function(b0){return b0==null?"":bO.call(b0)}:function(b0){return b0==null?"":b0.toString().replace(bI,"").replace(bE,"")},makeArray:function(b3,b1){var b0=b1||[];if(b3!=null){var b2=bF.type(b3);if(b3.length==null||b2==="string"||b2==="function"||b2==="regexp"||bF.isWindow(b3)){bz.call(b0,b3)}else{bF.merge(b0,b3)}}return b0},inArray:function(b2,b3,b1){var b0;if(b3){if(bv){return bv.call(b3,b2,b1)}b0=b3.length;b1=b1?b1<0?Math.max(0,b0+b1):b1:0;for(;b1<b0;b1++){if(b1 in b3&&b3[b1]===b2){return b1}}}return -1},merge:function(b4,b2){var b3=b4.length,b1=0;if(typeof b2.length==="number"){for(var b0=b2.length;b1<b0;b1++){b4[b3++]=b2[b1]}}else{while(b2[b1]!==L){b4[b3++]=b2[b1++]}}b4.length=b3;return b4},grep:function(b1,b6,b0){var b2=[],b5;b0=!!b0;for(var b3=0,b4=b1.length;b3<b4;b3++){b5=!!b6(b1[b3],b3);if(b0!==b5){b2.push(b1[b3])}}return b2},map:function(b0,b7,b8){var b5,b6,b4=[],b2=0,b1=b0.length,b3=b0 instanceof bF||b1!==L&&typeof b1==="number"&&((b1>0&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b2<b1;b2++){b5=b7(b0[b2],b2,b8);if(b5!=null){b4[b4.length]=b5}}}else{for(b6 in b0){b5=b7(b0[b6],b6,b8);if(b5!=null){b4[b4.length]=b5}}}return b4.concat.apply([],b4)},guid:1,proxy:function(b4,b3){if(typeof b3==="string"){var b2=b4[b3];b3=b4;b4=b2}if(!bF.isFunction(b4)){return L}var b0=bK.call(arguments,2),b1=function(){return b4.apply(b3,b0.concat(bK.call(arguments)))};b1.guid=b4.guid=b4.guid||b1.guid||bF.guid++;return b1},access:function(b0,b8,b6,b2,b5,b7){var b1=b0.length;if(typeof b8==="object"){for(var b3 in b8){bF.access(b0,b3,b8[b3],b2,b5,b6)}return b0}if(b6!==L){b2=!b7&&b2&&bF.isFunction(b6);for(var b4=0;b4<b1;b4++){b5(b0[b4],b8,b2?b6.call(b0[b4],b4,b5(b0[b4],b8)):b6,b7)}return b0}return b1?b5(b0[0],b8):L},now:function(){return(new Date()).getTime()},uaMatch:function(b1){b1=b1.toLowerCase();var b0=by.exec(b1)||bR.exec(b1)||bQ.exec(b1)||b1.indexOf("compatible")<0&&bS.exec(b1)||[];return{browser:b0[1]||"",version:b0[2]||"0"}},sub:function(){function b0(b3,b4){return new b0.fn.init(b3,b4)}bF.extend(true,b0,this);b0.superclass=this;b0.fn=b0.prototype=this();b0.fn.constructor=b0;b0.sub=this.sub;b0.fn.init=function b2(b3,b4){if(b4&&b4 instanceof bF&&!(b4 instanceof b0)){b4=b0(b4)}return bF.fn.init.call(this,b3,b4,b1)};b0.fn.init.prototype=b0.fn;var b1=b0(av);return b0},browser:{}});bF.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(b1,b0){bx["[object "+b0+"]"]=b0.toLowerCase()});bV=bF.uaMatch(bX);if(bV.browser){bF.browser[bV.browser]=true;bF.browser.version=bV.version}if(bF.browser.webkit){bF.browser.safari=true}if(bM.test("\xA0")){bI=/^[\s\xA0]+/;bE=/[\s\xA0]+$/}bD=bF(av);if(av.addEventListener){e=function(){av.removeEventListener("DOMContentLoaded",e,false);bF.ready()}}else{if(av.attachEvent){e=function(){if(av.readyState==="complete"){av.detachEvent("onreadystatechange",e);bF.ready()}}}}function bw(){if(bF.isReady){return}try{av.documentElement.doScroll("left")}catch(b0){setTimeout(bw,1);return}bF.ready()}return bF})();var a2={};function X(e){var bv=a2[e]={},bw,bx;e=e.split(/\s+/);for(bw=0,bx=e.length;bw<bx;bw++){bv[e[bw]]=true}return bv}b.Callbacks=function(bw){bw=bw?(a2[bw]||X(bw)):{};var bB=[],bC=[],bx,by,bv,bz,bA,bE=function(bF){var bG,bJ,bI,bH,bK;for(bG=0,bJ=bF.length;bG<bJ;bG++){bI=bF[bG];bH=b.type(bI);if(bH==="array"){bE(bI)}else{if(bH==="function"){if(!bw.unique||!bD.has(bI)){bB.push(bI)}}}}},e=function(bG,bF){bF=bF||[];bx=!bw.memory||[bG,bF];by=true;bA=bv||0;bv=0;bz=bB.length;for(;bB&&bA<bz;bA++){if(bB[bA].apply(bG,bF)===false&&bw.stopOnFalse){bx=true;break}}by=false;if(bB){if(!bw.once){if(bC&&bC.length){bx=bC.shift();bD.fireWith(bx[0],bx[1])}}else{if(bx===true){bD.disable()}else{bB=[]}}}},bD={add:function(){if(bB){var bF=bB.length;bE(arguments);if(by){bz=bB.length}else{if(bx&&bx!==true){bv=bF;e(bx[0],bx[1])}}}return this},remove:function(){if(bB){var bF=arguments,bH=0,bI=bF.length;for(;bH<bI;bH++){for(var bG=0;bG<bB.length;bG++){if(bF[bH]===bB[bG]){if(by){if(bG<=bz){bz--;if(bG<=bA){bA--}}}bB.splice(bG--,1);if(bw.unique){break}}}}}return this},has:function(bG){if(bB){var bF=0,bH=bB.length;for(;bF<bH;bF++){if(bG===bB[bF]){return true}}}return false},empty:function(){bB=[];return this},disable:function(){bB=bC=bx=L;return this},disabled:function(){return !bB},lock:function(){bC=L;if(!bx||bx===true){bD.disable()}return this},locked:function(){return !bC},fireWith:function(bG,bF){if(bC){if(by){if(!bw.once){bC.push([bG,bF])}}else{if(!(bw.once&&bx)){e(bG,bF)}}}return this},fire:function(){bD.fireWith(this,arguments);return this},fired:function(){return !!bx}};return bD};var aJ=[].slice;b.extend({Deferred:function(by){var bx=b.Callbacks("once memory"),bw=b.Callbacks("once memory"),bv=b.Callbacks("memory"),e="pending",bA={resolve:bx,reject:bw,notify:bv},bC={done:bx.add,fail:bw.add,progress:bv.add,state:function(){return e},isResolved:bx.fired,isRejected:bw.fired,then:function(bE,bD,bF){bB.done(bE).fail(bD).progress(bF);return this},always:function(){bB.done.apply(bB,arguments).fail.apply(bB,arguments);return this},pipe:function(bF,bE,bD){return b.Deferred(function(bG){b.each({done:[bF,"resolve"],fail:[bE,"reject"],progress:[bD,"notify"]},function(bI,bL){var bH=bL[0],bK=bL[1],bJ;if(b.isFunction(bH)){bB[bI](function(){bJ=bH.apply(this,arguments);if(bJ&&b.isFunction(bJ.promise)){bJ.promise().then(bG.resolve,bG.reject,bG.notify)}else{bG[bK+"With"](this===bB?bG:this,[bJ])}})}else{bB[bI](bG[bK])}})}).promise()},promise:function(bE){if(bE==null){bE=bC}else{for(var bD in bC){bE[bD]=bC[bD]}}return bE}},bB=bC.promise({}),bz;for(bz in bA){bB[bz]=bA[bz].fire;bB[bz+"With"]=bA[bz].fireWith}bB.done(function(){e="resolved"},bw.disable,bv.lock).fail(function(){e="rejected"},bx.disable,bv.lock);if(by){by.call(bB,bB)}return bB},when:function(bA){var bx=aJ.call(arguments,0),bv=0,e=bx.length,bB=new Array(e),bw=e,by=e,bC=e<=1&&bA&&b.isFunction(bA.promise)?bA:b.Deferred(),bE=bC.promise();function bD(bF){return function(bG){bx[bF]=arguments.length>1?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv<e;bv++){if(bx[bv]&&bx[bv].promise&&b.isFunction(bx[bv].promise)){bx[bv].promise().then(bD(bv),bC.reject,bz(bv))}else{--bw}}if(!bw){bC.resolveWith(bC,bx)}}else{if(bC!==bA){bC.resolveWith(bC,e?[bA]:[])}}return bE}});b.support=(function(){var bJ,bI,bF,bG,bx,bE,bA,bD,bz,bK,bB,by,bw,bv=av.createElement("div"),bH=av.documentElement;bv.setAttribute("className","t");bv.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav></:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="<div "+e+"><div></div></div><table "+e+" cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="<div style='width:4px;'></div>";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA<bz;bA++){delete bB[bv[bA]]}if(!(by?S:b.isEmptyObject)(bB)){return}}}if(!by){delete e[bw].data;if(!S(e[bw])){return}}if(b.support.deleteExpando||!e.setInterval){delete e[bw]}else{e[bw]=null}if(bD){if(b.support.deleteExpando){delete bx[bC]}else{if(bx.removeAttribute){bx.removeAttribute(bC)}else{bx[bC]=null}}}},_data:function(bv,e,bw){return b.data(bv,e,bw,true)},acceptData:function(bv){if(bv.nodeName){var e=b.noData[bv.nodeName.toLowerCase()];if(e){return !(e===true||bv.getAttribute("classid")!==e)}}return true}});b.fn.extend({data:function(by,bA){var bB,e,bw,bz=null;if(typeof by==="undefined"){if(this.length){bz=b.data(this[0]);if(this[0].nodeType===1&&!b._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var bx=0,bv=e.length;bx<bv;bx++){bw=e[bx].name;if(bw.indexOf("data-")===0){bw=b.camelCase(bw.substring(5));a5(this[0],bw,bz[bw])}}b._data(this[0],"parsedAttrs",true)}}return bz}else{if(typeof by==="object"){return this.each(function(){b.data(this,by)})}}bB=by.split(".");bB[1]=bB[1]?"."+bB[1]:"";if(bA===L){bz=this.triggerHandler("getData"+bB[1]+"!",[bB[0]]);if(bz===L&&this.length){bz=b.data(this[0],by);bz=a5(this[0],by,bz)}return bz===L&&bB[1]?this.data(bB[0]):bz}else{return this.each(function(){var bC=b(this),bD=[bB[0],bA];bC.triggerHandler("setData"+bB[1]+"!",bD);b.data(this,by,bA);bC.triggerHandler("changeData"+bB[1]+"!",bD)})}},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function a5(bx,bw,by){if(by===L&&bx.nodeType===1){var bv="data-"+bw.replace(aA,"-$1").toLowerCase();by=bx.getAttribute(bv);if(typeof by==="string"){try{by=by==="true"?true:by==="false"?false:by==="null"?null:b.isNumeric(by)?parseFloat(by):aS.test(by)?b.parseJSON(by):by}catch(bz){}b.data(bx,bw,by)}else{by=L}}return by}function S(bv){for(var e in bv){if(e==="data"&&b.isEmptyObject(bv[e])){continue}if(e!=="toJSON"){return false}}return true}function bi(by,bx,bA){var bw=bx+"defer",bv=bx+"queue",e=bx+"mark",bz=b._data(by,bw);if(bz&&(bA==="queue"||!b._data(by,bv))&&(bA==="mark"||!b._data(by,e))){setTimeout(function(){if(!b._data(by,bv)&&!b._data(by,e)){b.removeData(by,bw,true);bz.fire()}},0)}}b.extend({_mark:function(bv,e){if(bv){e=(e||"fx")+"mark";b._data(bv,e,(b._data(bv,e)||0)+1)}},_unmark:function(by,bx,bv){if(by!==true){bv=bx;bx=by;by=false}if(bx){bv=bv||"fx";var e=bv+"mark",bw=by?0:((b._data(bx,e)||1)-1);if(bw){b._data(bx,e,bw)}else{b.removeData(bx,e,true);bi(bx,bv,"mark")}}},queue:function(bv,e,bx){var bw;if(bv){e=(e||"fx")+"queue";bw=b._data(bv,e);if(bx){if(!bw||b.isArray(bx)){bw=b._data(bv,e,b.makeArray(bx))}else{bw.push(bx)}}return bw||[]}},dequeue:function(by,bx){bx=bx||"fx";var bv=b.queue(by,bx),bw=bv.shift(),e={};if(bw==="inprogress"){bw=bv.shift()}if(bw){if(bx==="fx"){bv.unshift("inprogress")}b._data(by,bx+".run",e);bw.call(by,function(){b.dequeue(by,bx)},e)}if(!bv.length){b.removeData(by,bx+"queue "+bx+".run",true);bi(by,bx,"queue")}}});b.fn.extend({queue:function(e,bv){if(typeof e!=="string"){bv=e;e="fx"}if(bv===L){return b.queue(this[0],e)}return this.each(function(){var bw=b.queue(this,e,bv);if(e==="fx"&&bw[0]!=="inprogress"){b.dequeue(this,e)}})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(bv,e){bv=b.fx?b.fx.speeds[bv]||bv:bv;e=e||"fx";return this.queue(e,function(bx,bw){var by=setTimeout(bx,bv);bw.stop=function(){clearTimeout(by)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(bD,bw){if(typeof bD!=="string"){bw=bD;bD=L}bD=bD||"fx";var e=b.Deferred(),bv=this,by=bv.length,bB=1,bz=bD+"defer",bA=bD+"queue",bC=bD+"mark",bx;function bE(){if(!(--bB)){e.resolveWith(bv,[bv])}}while(by--){if((bx=b.data(bv[by],bz,L,true)||(b.data(bv[by],bA,L,true)||b.data(bv[by],bC,L,true))&&b.data(bv[by],bz,b.Callbacks("once memory"),true))){bB++;bx.add(bE)}}bE();return e.promise()}});var aP=/[\n\t\r]/g,af=/\s+/,aU=/\r/g,g=/^(?:button|input)$/i,D=/^(?:button|input|object|select|textarea)$/i,l=/^a(?:rea)?$/i,ao=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,F=b.support.getSetAttribute,be,aY,aF;b.fn.extend({attr:function(e,bv){return b.access(this,e,bv,true,b.attr)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,bv){return b.access(this,e,bv,true,b.prop)},removeProp:function(e){e=b.propFix[e]||e;return this.each(function(){try{this[e]=L;delete this[e]}catch(bv){}})},addClass:function(by){var bA,bw,bv,bx,bz,bB,e;if(b.isFunction(by)){return this.each(function(bC){b(this).addClass(by.call(this,bC,this.className))})}if(by&&typeof by==="string"){bA=by.split(af);for(bw=0,bv=this.length;bw<bv;bw++){bx=this[bw];if(bx.nodeType===1){if(!bx.className&&bA.length===1){bx.className=by}else{bz=" "+bx.className+" ";for(bB=0,e=bA.length;bB<e;bB++){if(!~bz.indexOf(" "+bA[bB]+" ")){bz+=bA[bB]+" "}}bx.className=b.trim(bz)}}}}return this},removeClass:function(bz){var bA,bw,bv,by,bx,bB,e;if(b.isFunction(bz)){return this.each(function(bC){b(this).removeClass(bz.call(this,bC,this.className))})}if((bz&&typeof bz==="string")||bz===L){bA=(bz||"").split(af);for(bw=0,bv=this.length;bw<bv;bw++){by=this[bw];if(by.nodeType===1&&by.className){if(bz){bx=(" "+by.className+" ").replace(aP," ");for(bB=0,e=bA.length;bB<e;bB++){bx=bx.replace(" "+bA[bB]+" "," ")}by.className=b.trim(bx)}else{by.className=""}}}}return this},toggleClass:function(bx,bv){var bw=typeof bx,e=typeof bv==="boolean";if(b.isFunction(bx)){return this.each(function(by){b(this).toggleClass(bx.call(this,by,this.className,bv),bv)})}return this.each(function(){if(bw==="string"){var bA,bz=0,by=b(this),bB=bv,bC=bx.split(af);while((bA=bC[bz++])){bB=e?bB:!by.hasClass(bA);by[bB?"addClass":"removeClass"](bA)}}else{if(bw==="undefined"||bw==="boolean"){if(this.className){b._data(this,"__className__",this.className)}this.className=this.className||bx===false?"":b._data(this,"__className__")||""}}})},hasClass:function(e){var bx=" "+e+" ",bw=0,bv=this.length;for(;bw<bv;bw++){if(this[bw].nodeType===1&&(" "+this[bw].className+" ").replace(aP," ").indexOf(bx)>-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv<bz;bv++){bx=bC[bv];if(bx.selected&&(b.support.optDisabled?!bx.disabled:bx.getAttribute("disabled")===null)&&(!bx.parentNode.disabled||!b.nodeName(bx.parentNode,"optgroup"))){bA=b(bx).val();if(bw){return bA}bB.push(bA)}}if(bw&&!bB.length&&bC.length){return b(bC[by]).val()}return bB},set:function(bv,bw){var e=b.makeArray(bw);b(bv).find("option").each(function(){this.selected=b.inArray(b(this).val(),e)>=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw<e;bw++){bv=bA[bw];if(bv){by=b.propFix[bv]||bv;b.attr(bx,bv,"");bx.removeAttribute(F?bv:by);if(ao.test(bv)&&by in bx){bx[by]=false}}}}},attrHooks:{type:{set:function(e,bv){if(g.test(e.nodeName)&&e.parentNode){b.error("type property can't be changed")}else{if(!b.support.radioValue&&bv==="radio"&&b.nodeName(e,"input")){var bw=e.value;e.setAttribute("type",bv);if(bw){e.value=bw}return bv}}}},value:{get:function(bv,e){if(be&&b.nodeName(bv,"button")){return be.get(bv,e)}return e in bv?bv.value:null},set:function(bv,bw,e){if(be&&b.nodeName(bv,"button")){return be.set(bv,bw,e)}bv.value=bw}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(bz,bx,bA){var bw,e,by,bv=bz.nodeType;if(!bz||bv===3||bv===8||bv===2){return}by=bv!==1||!b.isXMLDoc(bz);if(by){bx=b.propFix[bx]||bx;e=b.propHooks[bx]}if(bA!==L){if(e&&"set" in e&&(bw=e.set(bz,bA,bx))!==L){return bw}else{return(bz[bx]=bA)}}else{if(e&&"get" in e&&(bw=e.get(bz,bx))!==null){return bw}else{return bz[bx]}}},propHooks:{tabIndex:{get:function(bv){var e=bv.getAttributeNode("tabindex");return e&&e.specified?parseInt(e.value,10):D.test(bv.nodeName)||l.test(bv.nodeName)&&bv.href?0:L}}}});b.attrHooks.tabindex=b.propHooks.tabIndex;aY={get:function(bv,e){var bx,bw=b.prop(bv,e);return bw===true||typeof bw!=="boolean"&&(bx=bv.getAttributeNode(e))&&bx.nodeValue!==false?e.toLowerCase():L},set:function(bv,bx,e){var bw;if(bx===false){b.removeAttr(bv,e)}else{bw=b.propFix[e]||e;if(bw in bv){bv[bw]=true}bv.setAttribute(e,e.toLowerCase())}return e}};if(!F){aF={name:true,id:true};be=b.valHooks.button={get:function(bw,bv){var e;e=bw.getAttributeNode(bv);return e&&(aF[bv]?e.nodeValue!=="":e.specified)?e.nodeValue:L},set:function(bw,bx,bv){var e=bw.getAttributeNode(bv);if(!e){e=av.createAttribute(bv);bw.setAttributeNode(e)}return(e.nodeValue=bx+"")}};b.attrHooks.tabindex.set=be.set;b.each(["width","height"],function(bv,e){b.attrHooks[e]=b.extend(b.attrHooks[e],{set:function(bw,bx){if(bx===""){bw.setAttribute(e,"auto");return bx}}})});b.attrHooks.contenteditable={get:be.get,set:function(bv,bw,e){if(bw===""){bw="false"}be.set(bv,bw,e)}}}if(!b.support.hrefNormalized){b.each(["href","src","width","height"],function(bv,e){b.attrHooks[e]=b.extend(b.attrHooks[e],{get:function(bx){var bw=bx.getAttribute(e,2);return bw===null?L:bw}})})}if(!b.support.style){b.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||L},set:function(e,bv){return(e.style.cssText=""+bv)}}}if(!b.support.optSelected){b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(bv){var e=bv.parentNode;if(e){e.selectedIndex;if(e.parentNode){e.parentNode.selectedIndex}}return null}})}if(!b.support.enctype){b.propFix.enctype="encoding"}if(!b.support.checkOn){b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}})}b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,bv){if(b.isArray(bv)){return(e.checked=b.inArray(b(e).val(),bv)>=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI<bC.length;bI++){bH=n.exec(bC[bI])||[];bF=bH[1];e=(bH[2]||"").split(".").sort();bE=b.event.special[bF]||{};bF=(by?bE.delegateType:bE.bindType)||bF;bE=b.event.special[bF]||{};bG=b.extend({type:bF,origType:bH[1],data:bA,handler:bJ,guid:bJ.guid,selector:by,quick:Y(by),namespace:e.join(".")},bv);bw=bK[bF];if(!bw){bw=bK[bF]=[];bw.delegateCount=0;if(!bE.setup||bE.setup.call(bx,bA,e,bB)===false){if(bx.addEventListener){bx.addEventListener(bF,bB,false)}else{if(bx.attachEvent){bx.attachEvent("on"+bF,bB)}}}}if(bE.add){bE.add.call(bx,bG);if(!bG.handler.guid){bG.handler.guid=bJ.guid}}if(by){bw.splice(bw.delegateCount++,0,bG)}else{bw.push(bG)}b.event.global[bF]=true}bx=null},global:{},remove:function(bJ,bE,bv,bH,bB){var bI=b.hasData(bJ)&&b._data(bJ),bF,bx,bz,bL,bC,bA,bG,bw,by,bK,bD,e;if(!bI||!(bw=bI.events)){return}bE=b.trim(bt(bE||"")).split(" ");for(bF=0;bF<bE.length;bF++){bx=n.exec(bE[bF])||[];bz=bL=bx[1];bC=bx[2];if(!bz){for(bz in bw){b.event.remove(bJ,bz+bE[bF],bv,bH,true)}continue}by=b.event.special[bz]||{};bz=(bH?by.delegateType:by.bindType)||bz;bD=bw[bz]||[];bA=bD.length;bC=bC?new RegExp("(^|\\.)"+bC.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(bG=0;bG<bD.length;bG++){e=bD[bG];if((bB||bL===e.origType)&&(!bv||bv.guid===e.guid)&&(!bC||bC.test(e.namespace))&&(!bH||bH===e.selector||bH==="**"&&e.selector)){bD.splice(bG--,1);if(e.selector){bD.delegateCount--}if(by.remove){by.remove.call(bJ,e)}}}if(bD.length===0&&bA!==bD.length){if(!by.teardown||by.teardown.call(bJ,bC)===false){b.removeEvent(bJ,bz,bI.handle)}delete bw[bz]}}if(b.isEmptyObject(bw)){bK=bI.handle;if(bK){bK.elem=null}b.removeData(bJ,["events","handle"],true)}},customEvent:{getData:true,setData:true,changeData:true},trigger:function(bv,bD,bA,bJ){if(bA&&(bA.nodeType===3||bA.nodeType===8)){return}var bG=bv.type||bv,bx=[],e,bw,bC,bH,bz,by,bF,bE,bB,bI;if(T.test(bG+b.event.triggered)){return}if(bG.indexOf("!")>=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bC<bB.length&&!bv.isPropagationStopped();bC++){bH=bB[bC][0];bv.type=bB[bC][1];bE=(b._data(bH,"events")||{})[bv.type]&&b._data(bH,"handle");if(bE){bE.apply(bH,bD)}bE=by&&bH[by];if(bE&&b.acceptData(bH)&&bE.apply(bH,bD)===false){bv.preventDefault()}}bv.type=bG;if(!bJ&&!bv.isDefaultPrevented()){if((!bF._default||bF._default.apply(bA.ownerDocument,bD)===false)&&!(bG==="click"&&b.nodeName(bA,"a"))&&b.acceptData(bA)){if(by&&bA[bG]&&((bG!=="focus"&&bG!=="blur")||bv.target.offsetWidth!==0)&&!b.isWindow(bA)){bz=bA[by];if(bz){bA[by]=null}b.event.triggered=bG;bA[bG]();b.event.triggered=L;if(bz){bA[by]=bz}}}}return bv.result},dispatch:function(e){e=b.event.fix(e||bb.event);var bz=((b._data(this,"events")||{})[e.type]||[]),bA=bz.delegateCount,bG=[].slice.call(arguments,0),by=!e.exclusive&&!e.namespace,bH=[],bC,bB,bK,bx,bF,bE,bv,bD,bI,bw,bJ;bG[0]=e;e.delegateTarget=this;if(bA&&!e.target.disabled&&!(e.button&&e.type==="click")){bx=b(this);bx.context=this.ownerDocument||this;for(bK=e.target;bK!=this;bK=bK.parentNode||this){bE={};bD=[];bx[0]=bK;for(bC=0;bC<bA;bC++){bI=bz[bC];bw=bI.selector;if(bE[bw]===L){bE[bw]=(bI.quick?j(bK,bI.quick):bx.is(bw))}if(bE[bw]){bD.push(bI)}}if(bD.length){bH.push({elem:bK,matches:bD})}}}if(bz.length>bA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC<bH.length&&!e.isPropagationStopped();bC++){bv=bH[bC];e.currentTarget=bv.elem;for(bB=0;bB<bv.matches.length&&!e.isImmediatePropagationStopped();bB++){bI=bv.matches[bB];if(by||(!e.namespace&&!bI.namespace)||e.namespace_re&&e.namespace_re.test(bI.namespace)){e.data=bI.data;e.handleObj=bI;bF=((b.event.special[bI.origType]||{}).handle||bI.handler).apply(bv.elem,bG);if(bF!==L){e.result=bF;if(bF===false){e.preventDefault();e.stopPropagation()}}}}}return e.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(bv,e){if(bv.which==null){bv.which=e.charCode!=null?e.charCode:e.keyCode}return bv}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(bx,bw){var by,bz,e,bv=bw.button,bA=bw.fromElement;if(bx.pageX==null&&bw.clientX!=null){by=bx.target.ownerDocument||av;bz=by.documentElement;e=by.body;bx.pageX=bw.clientX+(bz&&bz.scrollLeft||e&&e.scrollLeft||0)-(bz&&bz.clientLeft||e&&e.clientLeft||0);bx.pageY=bw.clientY+(bz&&bz.scrollTop||e&&e.scrollTop||0)-(bz&&bz.clientTop||e&&e.clientTop||0)}if(!bx.relatedTarget&&bA){bx.relatedTarget=bA===bx.target?bw.toElement:bA}if(!bx.which&&bv!==L){bx.which=(bv&1?1:(bv&2?3:(bv&4?2:0)))}return bx}},fix:function(bw){if(bw[b.expando]){return bw}var bv,bz,e=bw,bx=b.event.fixHooks[bw.type]||{},by=bx.props?this.props.concat(bx.props):this.props;bw=b.Event(e);for(bv=by.length;bv;){bz=by[--bv];bw[bz]=e[bz]}if(!bw.target){bw.target=e.srcElement||av}if(bw.target.nodeType===3){bw.target=bw.target.parentNode}if(bw.metaKey===L){bw.metaKey=bw.ctrlKey}return bx.filter?bx.filter(bw,e):bw},special:{ready:{setup:b.bindReady},load:{noBubble:true},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(bw,bv,e){if(b.isWindow(this)){this.onbeforeunload=e}},teardown:function(bv,e){if(this.onbeforeunload===e){this.onbeforeunload=null}}}},simulate:function(bw,by,bx,bv){var bz=b.extend(new b.Event(),bx,{type:bw,isSimulated:true,originalEvent:{}});if(bv){b.event.trigger(bz,null,by)}else{b.event.dispatch.call(by,bz)}if(bz.isDefaultPrevented()){bx.preventDefault()}}};b.event.handle=b.event.dispatch;b.removeEvent=av.removeEventListener?function(bv,e,bw){if(bv.removeEventListener){bv.removeEventListener(e,bw,false)}}:function(bv,e,bw){if(bv.detachEvent){bv.detachEvent("on"+e,bw)}};b.Event=function(bv,e){if(!(this instanceof b.Event)){return new b.Event(bv,e)}if(bv&&bv.type){this.originalEvent=bv;this.type=bv.type;this.isDefaultPrevented=(bv.defaultPrevented||bv.returnValue===false||bv.getPreventDefault&&bv.getPreventDefault())?i:bk}else{this.type=bv}if(e){b.extend(this,e)}this.timeStamp=bv&&bv.timeStamp||b.now();this[b.expando]=true};function bk(){return false}function i(){return true}b.Event.prototype={preventDefault:function(){this.isDefaultPrevented=i;var bv=this.originalEvent;if(!bv){return}if(bv.preventDefault){bv.preventDefault()}else{bv.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=i;var bv=this.originalEvent;if(!bv){return}if(bv.stopPropagation){bv.stopPropagation()}bv.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i;this.stopPropagation()},isDefaultPrevented:bk,isPropagationStopped:bk,isImmediatePropagationStopped:bk};b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(bv,e){b.event.special[bv]={delegateType:e,bindType:e,handle:function(bz){var bB=this,bA=bz.relatedTarget,by=bz.handleObj,bw=by.selector,bx;if(!bA||(bA!==bB&&!b.contains(bB,bA))){bz.type=by.origType;bx=by.handler.apply(this,arguments);bz.type=e}return bx}}});if(!b.support.submitBubbles){b.event.special.submit={setup:function(){if(b.nodeName(this,"form")){return false}b.event.add(this,"click._submit keypress._submit",function(bx){var bw=bx.target,bv=b.nodeName(bw,"input")||b.nodeName(bw,"button")?bw.form:L;if(bv&&!bv._submit_attached){b.event.add(bv,"submit._submit",function(e){if(this.parentNode&&!e.isTrigger){b.event.simulate("submit",this.parentNode,e,true)}});bv._submit_attached=true}})},teardown:function(){if(b.nodeName(this,"form")){return false}b.event.remove(this,"._submit")}}}if(!b.support.changeBubbles){b.event.special.change={setup:function(){if(bd.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio"){b.event.add(this,"propertychange._change",function(e){if(e.originalEvent.propertyName==="checked"){this._just_changed=true}});b.event.add(this,"click._change",function(e){if(this._just_changed&&!e.isTrigger){this._just_changed=false;b.event.simulate("change",this,e,true)}})}return false}b.event.add(this,"beforeactivate._change",function(bw){var bv=bw.target;if(bd.test(bv.nodeName)&&!bv._change_attached){b.event.add(bv,"change._change",function(e){if(this.parentNode&&!e.isSimulated&&!e.isTrigger){b.event.simulate("change",this.parentNode,e,true)}});bv._change_attached=true}})},handle:function(bv){var e=bv.target;if(this!==e||bv.isSimulated||bv.isTrigger||(e.type!=="radio"&&e.type!=="checkbox")){return bv.handleObj.handler.apply(this,arguments)}},teardown:function(){b.event.remove(this,"._change");return bd.test(this.nodeName)}}}if(!b.support.focusinBubbles){b.each({focus:"focusin",blur:"focusout"},function(bx,e){var bv=0,bw=function(by){b.event.simulate(e,by.target,b.event.fix(by),true)};b.event.special[e]={setup:function(){if(bv++===0){av.addEventListener(bx,bw,true)}},teardown:function(){if(--bv===0){av.removeEventListener(bx,bw,true)}}}})}b.fn.extend({on:function(bw,e,bz,by,bv){var bA,bx;if(typeof bw==="object"){if(typeof e!=="string"){bz=e;e=L}for(bx in bw){this.on(bx,e,bz,bw[bx],bv)}return this}if(bz==null&&by==null){by=e;bz=e=L}else{if(by==null){if(typeof e==="string"){by=bz;bz=L}else{by=bz;bz=e;e=L}}}if(by===false){by=bk}else{if(!by){return this}}if(bv===1){bA=by;by=function(bB){b().off(bB);return bA.apply(this,arguments)};by.guid=bA.guid||(bA.guid=b.guid++)}return this.each(function(){b.event.add(this,bw,by,bz,e)})},one:function(bv,e,bx,bw){return this.on.call(this,bv,e,bx,bw,1)},off:function(bw,e,by){if(bw&&bw.preventDefault&&bw.handleObj){var bv=bw.handleObj;b(bw.delegateTarget).off(bv.namespace?bv.type+"."+bv.namespace:bv.type,bv.selector,bv.handler);return this}if(typeof bw==="object"){for(var bx in bw){this.off(bx,e,bw[bx])}return this}if(e===false||typeof e==="function"){by=e;e=L}if(by===false){by=bk}return this.each(function(){b.event.remove(this,bw,by,e)})},bind:function(e,bw,bv){return this.on(e,null,bw,bv)},unbind:function(e,bv){return this.off(e,null,bv)},live:function(e,bw,bv){b(this.context).on(e,this.selector,bw,bv);return this},die:function(e,bv){b(this.context).off(e,this.selector||"**",bv);return this},delegate:function(e,bv,bx,bw){return this.on(bv,e,bx,bw)},undelegate:function(e,bv,bw){return arguments.length==1?this.off(e,"**"):this.off(bv,e,bw)},trigger:function(e,bv){return this.each(function(){b.event.trigger(e,bv,this)})},triggerHandler:function(e,bv){if(this[0]){return b.event.trigger(e,bv,this[0],true)}},toggle:function(bx){var bv=arguments,e=bx.guid||b.guid++,bw=0,by=function(bz){var bA=(b._data(this,"lastToggle"+bx.guid)||0)%bw;b._data(this,"lastToggle"+bx.guid,bA+1);bz.preventDefault();return bv[bA].apply(this,arguments)||false};by.guid=e;while(bw<bv.length){bv[bw++].guid=e}return this.click(by)},hover:function(e,bv){return this.mouseenter(e).mouseleave(bv||e)}});b.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu").split(" "),function(bv,e){b.fn[e]=function(bx,bw){if(bw==null){bw=bx;bx=null}return arguments.length>0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}});
+/*
+ * Sizzle CSS Selector Engine
+ *  Copyright 2011, The Dojo Foundation
+ *  Released under the MIT, BSD, and GPL Licenses.
+ *  More information: http://sizzlejs.com/
+ */
+(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e<bR.length;e++){if(bR[e]===bR[e-1]){bR.splice(e--,1)}}}}return bR};by.matches=function(e,bR){return by(e,null,null,bR)};by.matchesSelector=function(e,bR){return by(bR,null,null,[e]).length>0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS<bU;bS++){bV=bE.order[bS];if((bT=bE.leftMatch[bV].exec(bX))){bR=bT[1];bT.splice(1,1);if(bR.substr(bR.length-1)!=="\\"){bT[1]=(bT[1]||"").replace(bK,"");bW=bE.find[bV](bT,e,bY);if(bW!=null){bX=bX.replace(bE.match[bV],"");break}}}}if(!bW){bW=typeof e.getElementsByTagName!=="undefined"?e.getElementsByTagName("*"):[]}return{set:bW,expr:bX}};by.filter=function(b1,b0,b4,bU){var bW,e,bZ,b6,b3,bR,bT,bV,b2,bS=b1,b5=[],bY=b0,bX=b0&&b0[0]&&by.isXML(b0[0]);while(b1&&b0.length){for(bZ in bE.filter){if((bW=bE.leftMatch[bZ].exec(b1))!=null&&bW[2]){bR=bE.filter[bZ];bT=bW[1];e=false;bW.splice(1,1);if(bT.substr(bT.length-1)==="\\"){continue}if(bY===b5){b5=[]}if(bE.preFilter[bZ]){bW=bE.preFilter[bZ](bW,bY,b4,b5,bU,bX);if(!bW){e=b6=true}else{if(bW===true){continue}}}if(bW){for(bV=0;(b3=bY[bV])!=null;bV++){if(b3){b6=bR(b3,bW,bV,bY);b2=bU^b6;if(b4&&b6!=null){if(b2){e=true}else{bY[bV]=false}}else{if(b2){b5.push(b3);e=true}}}}}if(b6!==L){if(!b4){bY=b5}b1=b1.replace(bE.match[bZ],"");if(!e){return[]}break}}}if(b1===bS){if(e==null){by.error(b1)}else{break}}bS=b1}return bY};by.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var bw=by.getText=function(bU){var bS,bT,e=bU.nodeType,bR="";if(e){if(e===1||e===9){if(typeof bU.textContent==="string"){return bU.textContent}else{if(typeof bU.innerText==="string"){return bU.innerText.replace(bO,"")}else{for(bU=bU.firstChild;bU;bU=bU.nextSibling){bR+=bw(bU)}}}}else{if(e===3||e===4){return bU.nodeValue}}}else{for(bS=0;(bT=bU[bS]);bS++){if(bT.nodeType!==8){bR+=bw(bT)}}}return bR};var bE=by.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(bW,bR){var bT=typeof bR==="string",bV=bT&&!bQ.test(bR),bX=bT&&!bV;if(bV){bR=bR.toLowerCase()}for(var bS=0,e=bW.length,bU;bS<e;bS++){if((bU=bW[bS])){while((bU=bU.previousSibling)&&bU.nodeType!==1){}bW[bS]=bX||bU&&bU.nodeName.toLowerCase()===bR?bU||false:bU===bR}}if(bX){by.filter(bR,bW,true)}},">":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS<e;bS++){bV=bW[bS];if(bV){var bT=bV.parentNode;bW[bS]=bT.nodeName.toLowerCase()===bR?bT:false}}}else{for(;bS<e;bS++){bV=bW[bS];if(bV){bW[bS]=bU?bV.parentNode:bV.parentNode===bR}}if(bU){by.filter(bR,bW,true)}}},"":function(bT,bR,bV){var bU,bS=bI++,e=bN;if(typeof bR==="string"&&!bQ.test(bR)){bR=bR.toLowerCase();bU=bR;e=bv}e("parentNode",bR,bS,bT,bU,bV)},"~":function(bT,bR,bV){var bU,bS=bI++,e=bN;if(typeof bR==="string"&&!bQ.test(bR)){bR=bR.toLowerCase();bU=bR;e=bv}e("previousSibling",bR,bS,bT,bU,bV)}},find:{ID:function(bR,bS,bT){if(typeof bS.getElementById!=="undefined"&&!bT){var e=bS.getElementById(bR[1]);return e&&e.parentNode?[e]:[]}},NAME:function(bS,bV){if(typeof bV.getElementsByName!=="undefined"){var bR=[],bU=bV.getElementsByName(bS[1]);for(var bT=0,e=bU.length;bT<e;bT++){if(bU[bT].getAttribute("name")===bS[1]){bR.push(bU[bT])}}return bR.length===0?null:bR}},TAG:function(e,bR){if(typeof bR.getElementsByTagName!=="undefined"){return bR.getElementsByTagName(e[1])}}},preFilter:{CLASS:function(bT,bR,bS,e,bW,bX){bT=" "+bT[1].replace(bK,"")+" ";if(bX){return bT}for(var bU=0,bV;(bV=bR[bU])!=null;bU++){if(bV){if(bW^(bV.className&&(" "+bV.className+" ").replace(/[\t\n\r]/g," ").indexOf(bT)>=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1},lt:function(bS,bR,e){return bR<e[3]-0},gt:function(bS,bR,e){return bR>e[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV<bU;bV++){if(bT[bV]===bS){return false}}return true}else{by.error(e)}}}},CHILD:function(bS,bU){var bT,b0,bW,bZ,e,bV,bY,bX=bU[1],bR=bS;switch(bX){case"only":case"first":while((bR=bR.previousSibling)){if(bR.nodeType===1){return false}}if(bX==="first"){return true}bR=bS;case"last":while((bR=bR.nextSibling)){if(bR.nodeType===1){return false}}return true;case"nth":bT=bU[2];b0=bU[3];if(bT===1&&b0===0){return true}bW=bU[0];bZ=bS.parentNode;if(bZ&&(bZ[bC]!==bW||!bS.nodeIndex)){bV=0;for(bR=bZ.firstChild;bR;bR=bR.nextSibling){if(bR.nodeType===1){bR.nodeIndex=++bV}}bZ[bC]=bW}bY=bS.nodeIndex-b0;if(bT===0){return bY===0}else{return(bY%bT===0&&bY/bT>=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS<e;bS++){bR.push(bU[bS])}}else{for(;bU[bS];bS++){bR.push(bU[bS])}}}return bR}}var bJ,bG;if(av.documentElement.compareDocumentPosition){bJ=function(bR,e){if(bR===e){bB=true;return 0}if(!bR.compareDocumentPosition||!e.compareDocumentPosition){return bR.compareDocumentPosition?-1:1}return bR.compareDocumentPosition(e)&4?-1:1}}else{bJ=function(bY,bX){if(bY===bX){bB=true;return 0}else{if(bY.sourceIndex&&bX.sourceIndex){return bY.sourceIndex-bX.sourceIndex}}var bV,bR,bS=[],e=[],bU=bY.parentNode,bW=bX.parentNode,bZ=bU;if(bU===bW){return bG(bY,bX)}else{if(!bU){return -1}else{if(!bW){return 1}}}while(bZ){bS.unshift(bZ);bZ=bZ.parentNode}bZ=bW;while(bZ){e.unshift(bZ);bZ=bZ.parentNode}bV=bS.length;bR=e.length;for(var bT=0;bT<bV&&bT<bR;bT++){if(bS[bT]!==e[bT]){return bG(bS[bT],e[bT])}}return bT===bV?bG(bY,e[bT],-1):bG(bS[bT],bX,1)};bG=function(bR,e,bS){if(bR===e){return bS}var bT=bR.nextSibling;while(bT){if(bT===e){return -1}bT=bT.nextSibling}return 1}}(function(){var bR=av.createElement("div"),bS="script"+(new Date()).getTime(),e=av.documentElement;bR.innerHTML="<a name='"+bS+"'/>";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="<p class='TEST'></p>";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT<bS;bT++){var e=bZ[bT];if(e){var bU=false;e=e[bR];while(e){if(e[bC]===bV){bU=bZ[e.sizset];break}if(e.nodeType===1&&!bY){e[bC]=bV;e.sizset=bT}if(e.nodeName.toLowerCase()===bW){bU=e;break}e=e[bR]}bZ[bT]=bU}}}function bN(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT<bS;bT++){var e=bZ[bT];if(e){var bU=false;e=e[bR];while(e){if(e[bC]===bV){bU=bZ[e.sizset];break}if(e.nodeType===1){if(!bY){e[bC]=bV;e.sizset=bT}if(typeof bW!=="string"){if(e===bW){bU=true;break}}else{if(by.filter(bW,[e]).length>0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT<bR;bT++){by(bS,bY[bT],bX,bW)}return by.filter(bU,bX)};by.attr=b.attr;by.selectors.attrMap={};b.find=by;b.expr=by.selectors;b.expr[":"]=b.expr.filters;b.unique=by.uniqueSort;b.text=by.getText;b.isXMLDoc=by.isXML;b.contains=by.contains})();var ab=/Until$/,aq=/^(?:parents|prevUntil|prevAll)/,a9=/,/,bp=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,H=b.expr.match.POS,ay={children:true,contents:true,next:true,prev:true};b.fn.extend({find:function(e){var bw=this,by,bv;if(typeof e!=="string"){return b(e).filter(function(){for(by=0,bv=bw.length;by<bv;by++){if(b.contains(bw[by],this)){return true}}})}var bx=this.pushStack("","find",e),bA,bB,bz;for(by=0,bv=this.length;by<bv;by++){bA=bx.length;b.find(e,this[by],bx);if(by>0){for(bB=bA;bB<bx.length;bB++){for(bz=0;bz<bA;bz++){if(bx[bz]===bx[bB]){bx.splice(bB--,1);break}}}}}return bx},has:function(bv){var e=b(bv);return this.filter(function(){for(var bx=0,bw=e.length;bx<bw;bx++){if(b.contains(this,e[bx])){return true}}})},not:function(e){return this.pushStack(aG(this,e,false),"not",e)},filter:function(e){return this.pushStack(aG(this,e,true),"filter",e)},is:function(e){return !!e&&(typeof e==="string"?H.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw<by.length;bw++){if(b(bz).is(by[bw])){bv.push({selector:by[bw],elem:bz,level:bB})}}bz=bz.parentNode;bB++}return bv}var bA=H.test(by)||typeof by!=="string"?b(by,bx||this.context):0;for(bw=0,e=this.length;bw<e;bw++){bz=this[bw];while(bz){if(bA?bA.index(bz)>-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/<tbody/i,W=/<|&#?\w+;/,ae=/<(?:script|style)/i,O=/<(?:script|object|embed|option|style)/i,ah=new RegExp("<(?:"+aR+")","i"),o=/checked\s*(?:[^=]|=\s*.checked.)/i,bm=/\/(java|ecma)script/i,aN=/^\s*<!(?:\[CDATA\[|\-\-)/,ax={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},ac=a(av);ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div<div>","</div>"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1></$2>");try{for(var bw=0,bv=this.length;bw<bv;bw++){if(this[bw].nodeType===1){b.cleanData(this[bw].getElementsByTagName("*"));this[bw].innerHTML=bx}}}catch(by){this.empty().append(bx)}}else{if(b.isFunction(bx)){this.each(function(bz){var e=b(this);e.html(bx.call(this,bz,e.html()))})}else{this.empty().append(bx)}}}return this},replaceWith:function(e){if(this[0]&&this[0].parentNode){if(b.isFunction(e)){return this.each(function(bx){var bw=b(this),bv=bw.html();bw.replaceWith(e.call(this,bx,bv))})}if(typeof e!=="string"){e=b(e).detach()}return this.each(function(){var bw=this.nextSibling,bv=this.parentNode;b(this).remove();if(bw){b(bw).before(e)}else{b(bv).append(e)}})}else{return this.length?this.pushStack(b(b.isFunction(e)?e():e),"replaceWith",e):this}},detach:function(e){return this.remove(e,true)},domManip:function(bB,bF,bE){var bx,by,bA,bD,bC=bB[0],bv=[];if(!b.support.checkClone&&arguments.length===3&&typeof bC==="string"&&o.test(bC)){return this.each(function(){b(this).domManip(bB,bF,bE,true)})}if(b.isFunction(bC)){return this.each(function(bH){var bG=b(this);bB[0]=bC.call(this,bH,bF?bG.html():L);bG.domManip(bB,bF,bE)})}if(this[0]){bD=bC&&bC.parentNode;if(b.support.parentNode&&bD&&bD.nodeType===11&&bD.childNodes.length===this.length){bx={fragment:bD}}else{bx=b.buildFragment(bB,this,bv)}bA=bx.fragment;if(bA.childNodes.length===1){by=bA=bA.firstChild}else{by=bA.firstChild}if(by){bF=bF&&b.nodeName(by,"tr");for(var bw=0,e=this.length,bz=e-1;bw<e;bw++){bE.call(bF?ba(this[bw],by):this[bw],bx.cacheable||(e>1&&bw<bz)?b.clone(bA,true,true):bA)}}if(bv.length){b.each(bv,bo)}}return this}});function ba(e,bv){return b.nodeName(e,"table")?(e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody"))):e}function t(bB,bv){if(bv.nodeType!==1||!b.hasData(bB)){return}var by,bx,e,bA=b._data(bB),bz=b._data(bv,bA),bw=bA.events;if(bw){delete bz.handle;bz.events={};for(by in bw){for(bx=0,e=bw[by].length;bx<e;bx++){b.event.add(bv,by+(bw[by][bx].namespace?".":"")+bw[by][bx].namespace,bw[by][bx],bw[by][bx].data)}}}if(bz.data){bz.data=b.extend({},bz.data)}}function ai(bv,e){var bw;if(e.nodeType!==1){return}if(e.clearAttributes){e.clearAttributes()}if(e.mergeAttributes){e.mergeAttributes(bv)}bw=e.nodeName.toLowerCase();if(bw==="object"){e.outerHTML=bv.outerHTML}else{if(bw==="input"&&(bv.type==="checkbox"||bv.type==="radio")){if(bv.checked){e.defaultChecked=e.checked=bv.checked}if(e.value!==bv.value){e.value=bv.value}}else{if(bw==="option"){e.selected=bv.defaultSelected}else{if(bw==="input"||bw==="textarea"){e.defaultValue=bv.defaultValue}}}}e.removeAttribute(b.expando)}b.buildFragment=function(bz,bx,bv){var by,e,bw,bA,bB=bz[0];if(bx&&bx[0]){bA=bx[0].ownerDocument||bx[0]}if(!bA.createDocumentFragment){bA=av}if(bz.length===1&&typeof bB==="string"&&bB.length<512&&bA===av&&bB.charAt(0)==="<"&&!O.test(bB)&&(b.support.checkClone||!o.test(bB))&&(b.support.html5Clone||!ah.test(bB))){e=true;bw=b.fragments[bB];if(bw&&bw!==1){by=bw}}if(!by){by=bA.createDocumentFragment();b.clean(bz,bA,by,bv)}if(e){b.fragments[bB]=bw?by:1}return{fragment:by,cacheable:e}};b.fragments={};b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,bv){b.fn[e]=function(bw){var bz=[],bC=b(bw),bB=this.length===1&&this[0].parentNode;if(bB&&bB.nodeType===11&&bB.childNodes.length===1&&bC.length===1){bC[bv](this[0]);return this}else{for(var bA=0,bx=bC.length;bA<bx;bA++){var by=(bA>0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1></$2>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]==="<table>"&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB<bG;bB++){E(bz[bB])}}else{E(bz)}}if(bz.nodeType){bI.push(bz)}else{bI=b.merge(bI,bz)}}if(bH){bF=function(bL){return !bL.type||bm.test(bL.type)};for(bE=0;bI[bE];bE++){if(bA&&b.nodeName(bI[bE],"script")&&(!bI[bE].type||bI[bE].type.toLowerCase()==="text/javascript")){bA.push(bI[bE].parentNode?bI[bE].parentNode.removeChild(bI[bE]):bI[bE])}else{if(bI[bE].nodeType===1){var bJ=b.grep(bI[bE].getElementsByTagName("script"),bF);bI.splice.apply(bI,[bE+1,0].concat(bJ))}bH.appendChild(bI[bE])}}}return bI},cleanData:function(bv){var by,bw,e=b.cache,bB=b.event.special,bA=b.support.deleteExpando;for(var bz=0,bx;(bx=bv[bz])!=null;bz++){if(bx.nodeName&&b.noData[bx.nodeName.toLowerCase()]){continue}bw=bx[b.expando];if(bw){by=e[bw];if(by&&by.events){for(var bC in by.events){if(bB[bC]){b.event.remove(bx,bC)}else{b.removeEvent(bx,bC,by.handle)}}if(by.handle){by.handle.elem=null}}if(bA){delete bx[b.expando]}else{if(bx.removeAttribute){bx.removeAttribute(b.expando)}}delete e[bw]}}}});function bo(e,bv){if(bv.src){b.ajax({url:bv.src,async:false,dataType:"script"})}else{b.globalEval((bv.text||bv.textContent||bv.innerHTML||"").replace(aN,"/*$0*/"))}if(bv.parentNode){bv.parentNode.removeChild(bv)}}var ak=/alpha\([^)]*\)/i,au=/opacity=([^)]*)/,z=/([A-Z]|^ms)/g,bc=/^-?\d+(?:px)?$/i,bn=/^-?\d/,I=/^([\-+])=([\-+.\de]+)/,a7={position:"absolute",visibility:"hidden",display:"block"},an=["Left","Right"],a1=["Top","Bottom"],Z,aI,aX;b.fn.css=function(e,bv){if(arguments.length===2&&bv===L){return this}return b.access(this,e,bv,true,function(bx,bw,by){return by!==L?b.style(bx,bw,by):b.css(bx,bw)})};b.extend({cssHooks:{opacity:{get:function(bw,bv){if(bv){var e=Z(bw,"opacity","opacity");return e===""?"1":e}else{return bw.style.opacity}}}},cssNumber:{fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(bx,bw,bD,by){if(!bx||bx.nodeType===3||bx.nodeType===8||!bx.style){return}var bB,bC,bz=b.camelCase(bw),bv=bx.style,bE=b.cssHooks[bz];bw=b.cssProps[bz]||bz;if(bD!==L){bC=typeof bD;if(bC==="string"&&(bB=I.exec(bD))){bD=(+(bB[1]+1)*+bB[2])+parseFloat(b.css(bx,bw));bC="number"}if(bD==null||bC==="number"&&isNaN(bD)){return}if(bC==="number"&&!b.cssNumber[bz]){bD+="px"}if(!bE||!("set" in bE)||(bD=bE.set(bx,bD))!==L){try{bv[bw]=bD}catch(bA){}}}else{if(bE&&"get" in bE&&(bB=bE.get(bx,false,by))!==L){return bB}return bv[bw]}},css:function(by,bx,bv){var bw,e;bx=b.camelCase(bx);e=b.cssHooks[bx];bx=b.cssProps[bx]||bx;if(bx==="cssFloat"){bx="float"}if(e&&"get" in e&&(bw=e.get(by,true,bv))!==L){return bw}else{if(Z){return Z(by,bx)}}},swap:function(bx,bw,by){var e={};for(var bv in bw){e[bv]=bx.style[bv];bx.style[bv]=bw[bv]}by.call(bx);for(bv in bw){bx.style[bv]=e[bv]}}});b.curCSS=b.css;b.each(["height","width"],function(bv,e){b.cssHooks[e]={get:function(by,bx,bw){var bz;if(bx){if(by.offsetWidth!==0){return p(by,e,bw)}else{b.swap(by,a7,function(){bz=p(by,e,bw)})}return bz}},set:function(bw,bx){if(bc.test(bx)){bx=parseFloat(bx);if(bx>=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length;if(bA>0){if(bv!=="border"){for(;bx<e;bx++){if(!bv){bA-=parseFloat(b.css(by,"padding"+bz[bx]))||0}if(bv==="margin"){bA+=parseFloat(b.css(by,bv+bz[bx]))||0}else{bA-=parseFloat(b.css(by,"border"+bz[bx]+"Width"))||0}}}return bA+"px"}bA=Z(by,bw,bw);if(bA<0||bA==null){bA=by.style[bw]||0}bA=parseFloat(bA)||0;if(bv){for(;bx<e;bx++){bA+=parseFloat(b.css(by,"padding"+bz[bx]))||0;if(bv!=="padding"){bA+=parseFloat(b.css(by,"border"+bz[bx]+"Width"))||0}if(bv==="margin"){bA+=parseFloat(b.css(by,bv+bz[bx]))||0}}}return bA+"px"}if(b.expr&&b.expr.filters){b.expr.filters.hidden=function(bw){var bv=bw.offsetWidth,e=bw.offsetHeight;return(bv===0&&e===0)||(!b.support.reliableHiddenOffsets&&((bw.style&&bw.style.display)||b.css(bw,"display"))==="none")};b.expr.filters.visible=function(e){return !b.expr.filters.hidden(e)}}var k=/%20/g,ap=/\[\]$/,bs=/\r?\n/g,bq=/#.*$/,aD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,aZ=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,aM=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,aQ=/^(?:GET|HEAD)$/,c=/^\/\//,M=/\?/,a6=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw<bz;bw++){bv=bx[bw];bC=/^\+/.test(bv);if(bC){bv=bv.substr(1)||"*"}bB=e[bv]=e[bv]||[];bB[bC?"unshift":"push"](bA)}}}}function aW(bv,bE,bz,bD,bB,bx){bB=bB||bE.dataTypes[0];bx=bx||{};bx[bB]=true;var bA=bv[bB],bw=0,e=bA?bA.length:0,by=(bv===aa),bC;for(;bw<e&&(by||!bC);bw++){bC=bA[bw](bE,bz,bD);if(typeof bC==="string"){if(!by||bx[bC]){bC=L}else{bE.dataTypes.unshift(bC);bC=aW(bv,bE,bz,bD,bC,bx)}}}if((by||!bC)&&!bx["*"]){bC=aW(bv,bE,bz,bD,"*",bx)}return bC}function am(bw,bx){var bv,e,by=b.ajaxSettings.flatOptions||{};for(bv in bx){if(bx[bv]!==L){(by[bv]?bw:(e||(e={})))[bv]=bx[bv]}}if(e){b.extend(true,bw,e)}}b.fn.extend({load:function(bw,bz,bA){if(typeof bw!=="string"&&A){return A.apply(this,arguments)}else{if(!this.length){return this}}var by=bw.indexOf(" ");if(by>=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("<div>").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA<bw;bA++){if(bA===1){for(bE in bH.converters){if(typeof bE==="string"){bG[bE.toLowerCase()]=bH.converters[bE]}}}bx=bC;bC=bD[bA];if(bC==="*"){bC=bx}else{if(bx!=="*"&&bx!==bC){by=bx+" "+bC;bF=bG[by]||bG["* "+bC];if(!bF){e=L;for(bv in bG){bB=bv.split(" ");if(bB[0]===bx||bB[0]==="*"){e=bG[bB[1]+" "+bC];if(e){bv=bG[bv];if(bv===true){bF=e}else{if(e===true){bF=bv}}break}}}}if(!(bF||e)){b.error("No conversion from "+by.replace(" "," to "))}if(bF!==true){bz=bF?bF(bz):e(bv(bz))}}}}return bz}var aC=b.now(),u=/(\=)\?(&|$)|\?\?/i;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return b.expando+"_"+(aC++)}});b.ajaxPrefilter("json jsonp",function(bD,bA,bC){var bx=bD.contentType==="application/x-www-form-urlencoded"&&(typeof bD.data==="string");if(bD.dataTypes[0]==="jsonp"||bD.jsonp!==false&&(u.test(bD.url)||bx&&u.test(bD.data))){var bB,bw=bD.jsonpCallback=b.isFunction(bD.jsonpCallback)?bD.jsonpCallback():bD.jsonpCallback,bz=bb[bw],e=bD.url,by=bD.data,bv="$1"+bw+"$2";if(bD.jsonp!==false){e=e.replace(u,bv);if(bD.url===e){if(bx){by=by.replace(u,bv)}if(bD.data===by){e+=(/\?/.test(e)?"&":"?")+bD.jsonp+"="+bw}}}bD.url=e;bD.data=by;bb[bw]=function(bE){bB=[bE]};bC.always(function(){bb[bw]=bz;if(bB&&b.isFunction(bz)){bb[bw](bB[0])}});bD.converters["script json"]=function(){if(!bB){b.error(bw+" was not called")}return bB[0]};bD.dataTypes[0]="json";return"script"}});b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){b.globalEval(e);return e}}});b.ajaxPrefilter("script",function(e){if(e.cache===L){e.cache=false}if(e.crossDomain){e.type="GET";e.global=false}});b.ajaxTransport("script",function(bw){if(bw.crossDomain){var e,bv=av.head||av.getElementsByTagName("head")[0]||av.documentElement;return{send:function(bx,by){e=av.createElement("script");e.async="async";if(bw.scriptCharset){e.charset=bw.scriptCharset}e.src=bw.url;e.onload=e.onreadystatechange=function(bA,bz){if(bz||!e.readyState||/loaded|complete/.test(e.readyState)){e.onload=e.onreadystatechange=null;if(bv&&e.parentNode){bv.removeChild(e)}e=L;if(!bz){by(200,"success")}}};bv.insertBefore(e,bv.firstChild)},abort:function(){if(e){e.onload(0,1)}}}}});var B=bb.ActiveXObject?function(){for(var e in N){N[e](0,1)}}:false,y=0,N;function aL(){try{return new bb.XMLHttpRequest()}catch(bv){}}function aj(){try{return new bb.ActiveXObject("Microsoft.XMLHTTP")}catch(bv){}}b.ajaxSettings.xhr=bb.ActiveXObject?function(){return !this.isLocal&&aL()||aj()}:aL;(function(e){b.extend(b.support,{ajax:!!e,cors:!!e&&("withCredentials" in e)})})(b.ajaxSettings.xhr());if(b.support.ajax){b.ajaxTransport(function(e){if(!e.crossDomain||b.support.cors){var bv;return{send:function(bB,bw){var bA=e.xhr(),bz,by;if(e.username){bA.open(e.type,e.url,e.async,e.username,e.password)}else{bA.open(e.type,e.url,e.async)}if(e.xhrFields){for(by in e.xhrFields){bA[by]=e.xhrFields[by]}}if(e.mimeType&&bA.overrideMimeType){bA.overrideMimeType(e.mimeType)}if(!e.crossDomain&&!bB["X-Requested-With"]){bB["X-Requested-With"]="XMLHttpRequest"}try{for(by in bB){bA.setRequestHeader(by,bB[by])}}catch(bx){}bA.send((e.hasContent&&e.data)||null);bv=function(bK,bE){var bF,bD,bC,bI,bH;try{if(bv&&(bE||bA.readyState===4)){bv=L;if(bz){bA.onreadystatechange=b.noop;if(B){delete N[bz]}}if(bE){if(bA.readyState!==4){bA.abort()}}else{bF=bA.status;bC=bA.getAllResponseHeaders();bI={};bH=bA.responseXML;if(bH&&bH.documentElement){bI.xml=bH}bI.text=bA.responseText;try{bD=bA.statusText}catch(bJ){bD=""}if(!bF&&e.isLocal&&!e.crossDomain){bF=bI.text?200:404}else{if(bF===1223){bF=204}}}}}catch(bG){if(!bE){bw(-1,bG)}}if(bI){bw(bF,bD,bI,bC)}};if(!e.async||bA.readyState===4){bv()}else{bz=++y;if(B){if(!N){N={};b(bb).unload(B)}N[bz]=bv}bA.onreadystatechange=bv}},abort:function(){if(bv){bv(0,1)}}}}})}var Q={},a8,m,aB=/^(?:toggle|show|hide)$/,aT=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,a3,aH=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],a4;b.fn.extend({show:function(bx,bA,bz){var bw,by;if(bx||bx===0){return this.animate(a0("show",3),bx,bA,bz)}else{for(var bv=0,e=this.length;bv<e;bv++){bw=this[bv];if(bw.style){by=bw.style.display;if(!b._data(bw,"olddisplay")&&by==="none"){by=bw.style.display=""}if(by===""&&b.css(bw,"display")==="none"){b._data(bw,"olddisplay",x(bw.nodeName))}}}for(bv=0;bv<e;bv++){bw=this[bv];if(bw.style){by=bw.style.display;if(by===""||by==="none"){bw.style.display=b._data(bw,"olddisplay")||""}}}return this}},hide:function(bx,bA,bz){if(bx||bx===0){return this.animate(a0("hide",3),bx,bA,bz)}else{var bw,by,bv=0,e=this.length;for(;bv<e;bv++){bw=this[bv];if(bw.style){by=b.css(bw,"display");if(by!=="none"&&!b._data(bw,"olddisplay")){b._data(bw,"olddisplay",by)}}}for(bv=0;bv<e;bv++){if(this[bv].style){this[bv].style.display="none"}}return this}},_toggle:b.fn.toggle,toggle:function(bw,bv,bx){var e=typeof bw==="boolean";if(b.isFunction(bw)&&b.isFunction(bv)){this._toggle.apply(this,arguments)}else{if(bw==null||e){this.each(function(){var by=e?bw:b(this).is(":hidden");b(this)[by?"show":"hide"]()})}else{this.animate(a0("toggle",3),bw,bv,bx)}}return this},fadeTo:function(e,bx,bw,bv){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:bx},e,bw,bv)},animate:function(bz,bw,by,bx){var e=b.speed(bw,by,bx);if(b.isEmptyObject(bz)){return this.each(e.complete,[false])}bz=b.extend({},bz);function bv(){if(e.queue===false){b._mark(this)}var bE=b.extend({},e),bK=this.nodeType===1,bI=bK&&b(this).is(":hidden"),bB,bF,bD,bJ,bH,bC,bG,bL,bA;bE.animatedProperties={};for(bD in bz){bB=b.camelCase(bD);if(bD!==bB){bz[bB]=bz[bD];delete bz[bD]}bF=bz[bB];if(b.isArray(bF)){bE.animatedProperties[bB]=bF[1];bF=bz[bB]=bF[0]}else{bE.animatedProperties[bB]=bE.specialEasing&&bE.specialEasing[bB]||bE.easing||"swing"}if(bF==="hide"&&bI||bF==="show"&&!bI){return bE.complete.call(this)}if(bK&&(bB==="height"||bB==="width")){bE.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(b.css(this,"display")==="inline"&&b.css(this,"float")==="none"){if(!b.support.inlineBlockNeedsLayout||x(this.nodeName)==="inline"){this.style.display="inline-block"}else{this.style.zoom=1}}}}if(bE.overflow!=null){this.style.overflow="hidden"}for(bD in bz){bJ=new b.fx(this,bE,bD);bF=bz[bD];if(aB.test(bF)){bA=b._data(this,"toggle"+bD)||(bF==="toggle"?bI?"show":"hide":0);if(bA){b._data(this,"toggle"+bD,bA==="show"?"hide":"show");bJ[bA]()}else{bJ[bF]()}}else{bH=aT.exec(bF);bC=bJ.cur();if(bH){bG=parseFloat(bH[2]);bL=bH[3]||(b.cssNumber[bD]?"":"px");if(bL!=="px"){b.style(this,bD,(bG||1)+bL);bC=((bG||1)/bJ.cur())*bC;b.style(this,bD,bC+bL)}if(bH[1]){bG=((bH[1]==="-="?-1:1)*bG)+bC}bJ.custom(bC,bG,bL)}else{bJ.custom(bC,bF,"")}}}return true}return e.queue===false?this.each(bv):this.queue(e.queue,bv)},stop:function(bw,bv,e){if(typeof bw!=="string"){e=bv;bv=bw;bw=L}if(bv&&bw!==false){this.queue(bw||"fx",[])}return this.each(function(){var bx,by=false,bA=b.timers,bz=b._data(this);if(!e){b._unmark(true,this)}function bB(bE,bF,bD){var bC=bF[bD];b.removeData(bE,bD,true);bC.stop(e)}if(bw==null){for(bx in bz){if(bz[bx]&&bz[bx].stop&&bx.indexOf(".run")===bx.length-4){bB(this,bz,bx)}}}else{if(bz[bx=bw+".run"]&&bz[bx].stop){bB(this,bz,bx)}}for(bx=bA.length;bx--;){if(bA[bx].elem===this&&(bw==null||bA[bx].queue===bw)){if(e){bA[bx](true)}else{bA[bx].saveState()}by=true;bA.splice(bx,1)}}if(!(e&&by)){b.dequeue(this,bw)}})}});function bh(){setTimeout(at,0);return(a4=b.now())}function at(){a4=L}function a0(bv,e){var bw={};b.each(aH.concat.apply([],aH.slice(0,e)),function(){bw[this]=bv});return bw}b.each({slideDown:a0("show",1),slideUp:a0("hide",1),slideToggle:a0("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,bv){b.fn[e]=function(bw,by,bx){return this.animate(bv,bw,by,bx)}});b.extend({speed:function(bw,bx,bv){var e=bw&&typeof bw==="object"?b.extend({},bw):{complete:bv||!bv&&bx||b.isFunction(bw)&&bw,duration:bw,easing:bv&&bx||bx&&!b.isFunction(bx)&&bx};e.duration=b.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in b.fx.speeds?b.fx.speeds[e.duration]:b.fx.speeds._default;if(e.queue==null||e.queue===true){e.queue="fx"}e.old=e.complete;e.complete=function(by){if(b.isFunction(e.old)){e.old.call(this)}if(e.queue){b.dequeue(this,e.queue)}else{if(by!==false){b._unmark(this)}}};return e},easing:{linear:function(bw,bx,e,bv){return e+bv*bw},swing:function(bw,bx,e,bv){return((-Math.cos(bw*Math.PI)/2)+0.5)*bv+e}},timers:[],fx:function(bv,e,bw){this.options=e;this.elem=bv;this.prop=bw;e.orig=e.orig||{}}});b.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(b.fx.step[this.prop]||b.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var e,bv=b.css(this.elem,this.prop);return isNaN(e=parseFloat(bv))?!bv||bv==="auto"?0:bv:e},custom:function(bz,by,bx){var e=this,bw=b.fx;this.startTime=a4||bh();this.end=by;this.now=this.start=bz;this.pos=this.state=0;this.unit=bx||this.unit||(b.cssNumber[this.prop]?"":"px");function bv(bA){return e.step(bA)}bv.queue=this.options.queue;bv.elem=this.elem;bv.saveState=function(){if(e.options.hide&&b._data(e.elem,"fxshow"+e.prop)===L){b._data(e.elem,"fxshow"+e.prop,e.start)}};if(bv()&&b.timers.push(bv)&&!a3){a3=setInterval(bw.tick,bw.interval)}},show:function(){var e=b._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=e||b.style(this.elem,this.prop);this.options.show=true;if(e!==L){this.custom(this.cur(),e)}else{this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur())}b(this.elem).show()},hide:function(){this.options.orig[this.prop]=b._data(this.elem,"fxshow"+this.prop)||b.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(by){var bA,bB,bv,bx=a4||bh(),e=true,bz=this.elem,bw=this.options;if(by||bx>=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e<bv.length;e++){bw=bv[e];if(!bw()&&bv[e]===bw){bv.splice(e--,1)}}if(!bv.length){b.fx.stop()}},interval:13,stop:function(){clearInterval(a3);a3=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(e){b.style(e.elem,"opacity",e.now)},_default:function(e){if(e.elem.style&&e.elem.style[e.prop]!=null){e.elem.style[e.prop]=e.now+e.unit}else{e.elem[e.prop]=e.now}}}});b.each(["width","height"],function(e,bv){b.fx.step[bv]=function(bw){b.style(bw.elem,bv,Math.max(0,bw.now)+bw.unit)}});if(b.expr&&b.expr.filters){b.expr.filters.animated=function(e){return b.grep(b.timers,function(bv){return e===bv.elem}).length}}function x(bx){if(!Q[bx]){var e=av.body,bv=b("<"+bx+">").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b})}})(window);/*
+ * jQuery UI 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI
+ */
+(function(a,d){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();if(f){f.call(g)}},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?a(document):e},zIndex:function(h){if(h!==d){return this.css("zIndex",h)}if(this.length){var f=a(this[0]),e,g;while(f.length&&f[0]!==document){e=f.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){g=parseInt(f.css("zIndex"),10);if(!isNaN(g)&&g!==0){return g}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){var f=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),k={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function j(m,l,i,n){a.each(f,function(){l-=parseFloat(a.curCSS(m,"padding"+this,true))||0;if(i){l-=parseFloat(a.curCSS(m,"border"+this+"Width",true))||0}if(n){l-=parseFloat(a.curCSS(m,"margin"+this,true))||0}});return l}a.fn["inner"+e]=function(i){if(i===d){return k["inner"+e].call(this)}return this.each(function(){a(this).css(h,j(this,i)+"px")})};a.fn["outer"+e]=function(i,l){if(typeof i!=="number"){return k["outer"+e].call(this,i)}return this.each(function(){a(this).css(h,j(this,i,true,l)+"px")})}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(g,f,e){return !!a.data(g,e[3])},focusable:function(e){return c(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));f.offsetHeight;a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(f,g,j){var h=a.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h<j.length;h++){if(e.options[j[h][0]]){j[h][1].apply(e.element,f)}}}},contains:function(f,e){return document.compareDocumentPosition?f.compareDocumentPosition(e)&16:f!==e&&f.contains(e)},hasScroll:function(h,f){if(a(h).css("overflow")==="hidden"){return false}var e=(f&&f==="left")?"scrollLeft":"scrollTop",g=false;if(h[e]>0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(j,f,i,h,e,g){return a.ui.isOverAxis(j,i,e)&&a.ui.isOverAxis(f,h,g)}})})(jQuery);/*
+ * jQuery UI Widget 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Widget
+ */
+(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(g){}})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,f)};b[g]=b[g]||{};b[g][f]=function(k,l){if(arguments.length){this._createWidget(k,l)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var k=b.data(this,f),l=k&&b.isFunction(k[i])?k[i].apply(k,h):k;if(l!==k&&l!==d){j=l;return false}})}else{this.each(function(){var k=b.data(this,f);if(k){k.option(i||{})._init()}else{b.data(this,f,new e(i,this))}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,f,g){var j,i,h=this.options[e];g=g||{};f=b.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();f.target=this.element[0];i=f.originalEvent;if(i){for(j in i){if(!(j in f)){f[j]=i[j]}}}this.element.trigger(f,g);return !(b.isFunction(h)&&h.call(this.element[0],f,g)===false||f.isDefaultPrevented())}}})(jQuery);/*
+ * jQuery UI Mouse 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Mouse
+ *
+ * Depends:
+ *	jquery.ui.widget.js
+ */
+(function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){if(a){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),d=(typeof this.options.cancel=="string"&&f.target.nodeName?b(f.target).closest(this.options.cancel).length:false);if(!g||d||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}if(true===b.data(f.target,this.widgetName+".preventClickEvent")){b.removeData(f.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(c('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var g=0;g<l.length;g++){var j=c.trim(l[g]),e="ui-resizable-"+j;var h=c('<div class="ui-resizable-handle '+e+'"></div>');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(k.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(k.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}this._renderProxy();var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;var n={width:(m.helper.width()-k),height:(m.helper.height()-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,k,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;k=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(h<e.maxWidth){e.maxWidth=h}if(k<e.maxHeight){e.maxHeight=k}}this._vBoundaries=e},_updateCache:function(e){var f=this.options;this.offset=this.helper.offset();if(a(e.left)){this.position.left=e.left}if(a(e.top)){this.position.top=e.top}if(a(e.height)){this.size.height=e.height}if(a(e.width)){this.size.width=e.width}},_updateRatio:function(h,g){var i=this.options,j=this.position,f=this.size,e=this.axis;if(a(h.height)){h.width=(h.height*this.aspectRatio)}else{if(a(h.width)){h.height=(h.width/this.aspectRatio)}}if(e=="sw"){h.left=j.left+(f.width-h.width);h.top=null}if(e=="nw"){h.top=j.top+(f.height-h.height);h.left=j.left+(f.width-h.width)}return h},_respectSize:function(l,g){var j=this.helper,i=this._vBoundaries,r=this._aspectRatio||g.shiftKey,q=this.axis,t=a(l.width)&&i.maxWidth&&(i.maxWidth<l.width),m=a(l.height)&&i.maxHeight&&(i.maxHeight<l.height),h=a(l.width)&&i.minWidth&&(i.minWidth>l.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(t){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(t&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f<this._proportionallyResizeElements.length;f++){var h=this._proportionallyResizeElements[f];if(!this.borderDif){var e=[h.css("borderTopWidth"),h.css("borderRightWidth"),h.css("borderBottomWidth"),h.css("borderLeftWidth")],j=[h.css("paddingTop"),h.css("paddingRight"),h.css("paddingBottom"),h.css("paddingLeft")];this.borderDif=c.map(e,function(l,n){var m=parseInt(l,10)||0,o=parseInt(j[n],10)||0;return m+o})}if(c.browser.msie&&!(!(c(g).is(":hidden")||c(g).parents(":hidden").length))){continue}h.css({height:(g.height()-this.borderDif[0]-this.borderDif[2])||0,width:(g.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var f=this.element,i=this.options;this.elementOffset=f.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.18"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10)})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(o,function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)})}else{e(j.alsoResize)}},stop:function(e,f){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}t.containerElement=c(k);if(/document/.test(g)||g==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=t.containerOffset,e=t.containerSize.height,m=t.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);t.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var t=c(this).data("resizable"),i=t.options,f=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||g.shiftKey,e={top:0,left:0},h=t.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-e.left));if(r){t.size.height=t.size.width/i.aspectRatio}t.position.left=i.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*i.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-e.left:(t.offset.left-e.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-e.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);/*
+ * jQuery hashchange event - v1.3 - 7/21/2010
+ * http://benalman.com/projects/jquery-hashchange-plugin/
+ * 
+ * Copyright (c) 2010 "Cowboy" Ben Alman
+ * Dual licensed under the MIT and GPL licenses.
+ * http://benalman.com/about/license/
+ */
+(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){r||l(a());n()}).attr("src",r||"javascript:0").insertAfter("body")[0].contentWindow;h.onpropertychange=function(){try{if(event.propertyName==="title"){q.document.title=h.title}}catch(s){}}}};j.stop=k;o=function(){return a(q.location.href)};l=function(v,s){var u=q.document,t=$.fn[c].domain;if(v!==s){u.title=h.title;u.open();t&&u.write('<script>document.domain="'+t+'"<\/script>');u.close();q.location.hash=v}}})();return j})()})(jQuery,this);(function(c){var a=c.scrollTo=function(f,e,d){c(window).scrollTo(f,e,d)};a.defaults={axis:"xy",duration:parseFloat(c.fn.jquery)>=1.3?0:1};a.window=function(d){return c(window)._scrollable()};c.fn._scrollable=function(){return this.map(function(){var e=this,d=!e.nodeName||c.inArray(e.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!d){return e}var f=(e.contentWindow||e).document||e.ownerDocument||e;return c.browser.safari||f.compatMode=="BackCompat"?f.body:f.documentElement})};c.fn.scrollTo=function(f,e,d){if(typeof e=="object"){d=e;e=0}if(typeof d=="function"){d={onAfter:d}}if(f=="max"){f=9000000000}d=c.extend({},a.defaults,d);e=e||d.speed||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){e/=2}d.offset=b(d.offset);d.over=b(d.over);return this._scrollable().each(function(){var l=this,j=c(l),k=f,i,g={},m=j.is("html,body");switch(typeof k){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(k)){k=b(k);break}k=c(k,this);case"object":if(k.is||k.style){i=(k=c(k)).offset()}}c.each(d.axis.split(""),function(q,r){var s=r=="x"?"Left":"Top",u=s.toLowerCase(),p="scroll"+s,o=l[p],n=a.max(l,r);if(i){g[p]=i[u]+(m?0:o-j.offset()[u]);if(d.margin){g[p]-=parseInt(k.css("margin"+s))||0;g[p]-=parseInt(k.css("border"+s+"Width"))||0}g[p]+=d.offset[u]||0;if(d.over[u]){g[p]+=k[r=="x"?"width":"height"]()*d.over[u]}}else{var t=k[u];g[p]=t.slice&&t.slice(-1)=="%"?parseFloat(t)/100*n:t}if(/^\d+$/.test(g[p])){g[p]=g[p]<=0?0:Math.min(g[p],n)}if(!q&&d.queue){if(o!=g[p]){h(d.onAfterFirst)}delete g[p]}});h(d.onAfter);function h(n){j.animate(g,e,d.easing,n&&function(){n.call(this,f,d)})}}).end()};a.max=function(j,i){var h=i=="x"?"Width":"Height",e="scroll"+h;if(!c(j).is("html,body")){return j[e]-c(j)[h.toLowerCase()]()}var g="client"+h,f=j.ownerDocument.documentElement,d=j.ownerDocument.body;return Math.max(f[e],d[e])-Math.min(f[g],d[g])};function b(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);/*
+ PowerTip - v1.2.0 - 2013-04-03
+ http://stevenbenner.github.com/jquery-powertip/
+ Copyright (c) 2013 Steven Benner (http://stevenbenner.com/).
+ Released under MIT license.
+ https://raw.github.com/stevenbenner/jquery-powertip/master/LICENSE.txt
+*/
+(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(jQuery)}}(function(k){var A=k(document),s=k(window),w=k("body");var n="displayController",e="hasActiveHover",d="forcedOpen",u="hasMouseMove",f="mouseOnToPopup",g="originalTitle",y="powertip",o="powertipjq",l="powertiptarget",E=180/Math.PI;var c={isTipOpen:false,isFixedTipOpen:false,isClosing:false,tipOpenImminent:false,activeHover:null,currentX:0,currentY:0,previousX:0,previousY:0,desyncTimeout:null,mouseTrackingActive:false,delayInProgress:false,windowWidth:0,windowHeight:0,scrollTop:0,scrollLeft:0};var p={none:0,top:1,bottom:2,left:4,right:8};k.fn.powerTip=function(F,N){if(!this.length){return this}if(k.type(F)==="string"&&k.powerTip[F]){return k.powerTip[F].call(this,this,N)}var O=k.extend({},k.fn.powerTip.defaults,F),G=new x(O);h();this.each(function M(){var R=k(this),Q=R.data(y),P=R.data(o),T=R.data(l),S;if(R.data(n)){k.powerTip.destroy(R)}S=R.attr("title");if(!Q&&!T&&!P&&S){R.data(y,S);R.data(g,S);R.removeAttr("title")}R.data(n,new t(R,O,G))});if(!O.manual){this.on({"mouseenter.powertip":function J(P){k.powerTip.show(this,P)},"mouseleave.powertip":function L(){k.powerTip.hide(this)},"focus.powertip":function K(){k.powerTip.show(this)},"blur.powertip":function H(){k.powerTip.hide(this,true)},"keydown.powertip":function I(P){if(P.keyCode===27){k.powerTip.hide(this,true)}}})}return this};k.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false};k.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};k.powerTip={show:function z(F,G){if(G){i(G);c.previousX=G.pageX;c.previousY=G.pageY;k(F).data(n).show()}else{k(F).first().data(n).show(true,true)}return F},reposition:function r(F){k(F).first().data(n).resetPosition();return F},hide:function D(G,F){if(G){k(G).first().data(n).hide(F)}else{if(c.activeHover){c.activeHover.data(n).hide(true)}}return G},destroy:function C(G){k(G).off(".powertip").each(function F(){var I=k(this),H=[g,n,e,d];if(I.data(g)){I.attr("title",I.data(g));H.push(y)}I.removeData(H)});return G}};k.powerTip.showTip=k.powerTip.show;k.powerTip.closeTip=k.powerTip.hide;function b(){var F=this;F.top="auto";F.left="auto";F.right="auto";F.bottom="auto";F.set=function(H,G){if(k.isNumeric(G)){F[H]=Math.round(G)}}}function t(K,N,F){var J=null;function L(P,Q){M();if(!K.data(e)){if(!P){c.tipOpenImminent=true;J=setTimeout(function O(){J=null;I()},N.intentPollInterval)}else{if(Q){K.data(d,true)}F.showTip(K)}}}function G(P){M();c.tipOpenImminent=false;if(K.data(e)){K.data(d,false);if(!P){c.delayInProgress=true;J=setTimeout(function O(){J=null;F.hideTip(K);c.delayInProgress=false},N.closeDelay)}else{F.hideTip(K)}}}function I(){var Q=Math.abs(c.previousX-c.currentX),O=Math.abs(c.previousY-c.currentY),P=Q+O;if(P<N.intentSensitivity){F.showTip(K)}else{c.previousX=c.currentX;c.previousY=c.currentY;L()}}function M(){J=clearTimeout(J);c.delayInProgress=false}function H(){F.resetPosition(K)}this.show=L;this.hide=G;this.cancel=M;this.resetPosition=H}function j(){function G(M,L,J,O,P){var K=L.split("-")[0],N=new b(),I;if(q(M)){I=H(M,K)}else{I=F(M,K)}switch(L){case"n":N.set("left",I.left-(J/2));N.set("bottom",c.windowHeight-I.top+P);break;case"e":N.set("left",I.left+P);N.set("top",I.top-(O/2));break;case"s":N.set("left",I.left-(J/2));N.set("top",I.top+P);break;case"w":N.set("top",I.top-(O/2));N.set("right",c.windowWidth-I.left+P);break;case"nw":N.set("bottom",c.windowHeight-I.top+P);N.set("right",c.windowWidth-I.left-20);break;case"nw-alt":N.set("left",I.left);N.set("bottom",c.windowHeight-I.top+P);break;case"ne":N.set("left",I.left-20);N.set("bottom",c.windowHeight-I.top+P);break;case"ne-alt":N.set("bottom",c.windowHeight-I.top+P);N.set("right",c.windowWidth-I.left);break;case"sw":N.set("top",I.top+P);N.set("right",c.windowWidth-I.left-20);break;case"sw-alt":N.set("left",I.left);N.set("top",I.top+P);break;case"se":N.set("left",I.left-20);N.set("top",I.top+P);break;case"se-alt":N.set("top",I.top+P);N.set("right",c.windowWidth-I.left);break}return N}function F(K,J){var O=K.offset(),N=K.outerWidth(),I=K.outerHeight(),M,L;switch(J){case"n":M=O.left+N/2;L=O.top;break;case"e":M=O.left+N;L=O.top+I/2;break;case"s":M=O.left+N/2;L=O.top+I;break;case"w":M=O.left;L=O.top+I/2;break;case"nw":M=O.left;L=O.top;break;case"ne":M=O.left+N;L=O.top;break;case"sw":M=O.left;L=O.top+I;break;case"se":M=O.left+N;L=O.top+I;break}return{top:L,left:M}}function H(O,K){var S=O.closest("svg")[0],N=O[0],W=S.createSVGPoint(),L=N.getBBox(),V=N.getScreenCTM(),M=L.width/2,Q=L.height/2,P=[],I=["nw","n","ne","e","se","s","sw","w"],U,X,R,T;function J(){P.push(W.matrixTransform(V))}W.x=L.x;W.y=L.y;J();W.x+=M;J();W.x+=M;J();W.y+=Q;J();W.y+=Q;J();W.x-=M;J();W.x-=M;J();W.y-=Q;J();if(P[0].y!==P[1].y||P[0].x!==P[7].x){X=Math.atan2(V.b,V.a)*E;R=Math.ceil(((X%360)-22.5)/45);if(R<1){R+=8}while(R--){I.push(I.shift())}}for(T=0;T<P.length;T++){if(I[T]===K){U=P[T];break}}return{top:U.y+c.scrollTop,left:U.x+c.scrollLeft}}this.compute=G}function x(Q){var P=new j(),O=k("#"+Q.popupId);if(O.length===0){O=k("<div/>",{id:Q.popupId});if(w.length===0){w=k("body")}w.append(O)}if(Q.followMouse){if(!O.data(u)){A.on("mousemove",M);s.on("scroll",M);O.data(u,true)}}if(Q.mouseOnToPopup){O.on({mouseenter:function L(){if(O.data(f)){if(c.activeHover){c.activeHover.data(n).cancel()}}},mouseleave:function N(){if(c.activeHover){c.activeHover.data(n).hide()}}})}function I(S){S.data(e,true);O.queue(function R(T){H(S);T()})}function H(S){var U;if(!S.data(e)){return}if(c.isTipOpen){if(!c.isClosing){K(c.activeHover)}O.delay(100).queue(function R(V){H(S);V()});return}S.trigger("powerTipPreRender");U=B(S);if(U){O.empty().append(U)}else{return}S.trigger("powerTipRender");c.activeHover=S;c.isTipOpen=true;O.data(f,Q.mouseOnToPopup);if(!Q.followMouse){G(S);c.isFixedTipOpen=true}else{M()}O.fadeIn(Q.fadeInTime,function T(){if(!c.desyncTimeout){c.desyncTimeout=setInterval(J,500)}S.trigger("powerTipOpen")})}function K(R){c.isClosing=true;c.activeHover=null;c.isTipOpen=false;c.desyncTimeout=clearInterval(c.desyncTimeout);R.data(e,false);R.data(d,false);O.fadeOut(Q.fadeOutTime,function S(){var T=new b();c.isClosing=false;c.isFixedTipOpen=false;O.removeClass();T.set("top",c.currentY+Q.offset);T.set("left",c.currentX+Q.offset);O.css(T);R.trigger("powerTipClose")})}function M(){if(!c.isFixedTipOpen&&(c.isTipOpen||(c.tipOpenImminent&&O.data(u)))){var R=O.outerWidth(),V=O.outerHeight(),U=new b(),S,T;U.set("top",c.currentY+Q.offset);U.set("left",c.currentX+Q.offset);S=m(U,R,V);if(S!==p.none){T=a(S);if(T===1){if(S===p.right){U.set("left",c.windowWidth-R)}else{if(S===p.bottom){U.set("top",c.scrollTop+c.windowHeight-V)}}}else{U.set("left",c.currentX-R-Q.offset);U.set("top",c.currentY-V-Q.offset)}}O.css(U)}}function G(S){var R,T;if(Q.smartPlacement){R=k.fn.powerTip.smartPlacementLists[Q.placement];k.each(R,function(U,W){var V=m(F(S,W),O.outerWidth(),O.outerHeight());T=W;if(V===p.none){return false}})}else{F(S,Q.placement);T=Q.placement}O.addClass(T)}function F(U,T){var R=0,S,W,V=new b();V.set("top",0);V.set("left",0);O.css(V);do{S=O.outerWidth();W=O.outerHeight();V=P.compute(U,T,S,W,Q.offset);O.css(V)}while(++R<=5&&(S!==O.outerWidth()||W!==O.outerHeight()));return V}function J(){var R=false;if(c.isTipOpen&&!c.isClosing&&!c.delayInProgress){if(c.activeHover.data(e)===false||c.activeHover.is(":disabled")){R=true}else{if(!v(c.activeHover)&&!c.activeHover.is(":focus")&&!c.activeHover.data(d)){if(O.data(f)){if(!v(O)){R=true}}else{R=true}}}if(R){K(c.activeHover)}}}this.showTip=I;this.hideTip=K;this.resetPosition=G}function q(F){return window.SVGElement&&F[0] instanceof SVGElement}function h(){if(!c.mouseTrackingActive){c.mouseTrackingActive=true;k(function H(){c.scrollLeft=s.scrollLeft();c.scrollTop=s.scrollTop();c.windowWidth=s.width();c.windowHeight=s.height()});A.on("mousemove",i);s.on({resize:function G(){c.windowWidth=s.width();c.windowHeight=s.height()},scroll:function F(){var I=s.scrollLeft(),J=s.scrollTop();if(I!==c.scrollLeft){c.currentX+=I-c.scrollLeft;c.scrollLeft=I}if(J!==c.scrollTop){c.currentY+=J-c.scrollTop;c.scrollTop=J}}})}}function i(F){c.currentX=F.pageX;c.currentY=F.pageY}function v(F){var H=F.offset(),J=F[0].getBoundingClientRect(),I=J.right-J.left,G=J.bottom-J.top;return c.currentX>=H.left&&c.currentX<=H.left+I&&c.currentY>=H.top&&c.currentY<=H.top+G}function B(I){var G=I.data(y),F=I.data(o),K=I.data(l),H,J;if(G){if(k.isFunction(G)){G=G.call(I[0])}J=G}else{if(F){if(k.isFunction(F)){F=F.call(I[0])}if(F.length>0){J=F.clone(true,true)}}else{if(K){H=k("#"+K);if(H.length>0){J=H.html()}}}}return J}function m(M,L,K){var G=c.scrollTop,J=c.scrollLeft,I=G+c.windowHeight,F=J+c.windowWidth,H=p.none;if(M.top<G||Math.abs(M.bottom-c.windowHeight)-K<G){H|=p.top}if(M.top+K>I||Math.abs(M.bottom-c.windowHeight)>I){H|=p.bottom}if(M.left<J||M.right+L>F){H|=p.left}if(M.left+L>F||M.right<J){H|=p.right}return H}function a(G){var F=0;while(G){G&=G-1;F++}return F}}));
\ No newline at end of file
diff --git a/test-framework/docs/md__home_blus_DemLabs_libdap_MVL_libdap-test_README.html b/test-framework/docs/md__home_blus_DemLabs_libdap_MVL_libdap-test_README.html
new file mode 100644
index 000000000..14b663713
--- /dev/null
+++ b/test-framework/docs/md__home_blus_DemLabs_libdap_MVL_libdap-test_README.html
@@ -0,0 +1,90 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<title>LibDap-test: libdap-test</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+  $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">LibDap-test
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.11 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
+      <li><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+</div><!-- top -->
+<div class="header">
+  <div class="headertitle">
+<div class="title">libdap-test </div>  </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><p><a href="https://travis-ci.com/kelvinblockchain/libdap-test"></a> </p>
+</div></div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.11
+</small></address>
+</body>
+</html>
diff --git a/test-framework/docs/nav_f.png b/test-framework/docs/nav_f.png
new file mode 100644
index 0000000000000000000000000000000000000000..72a58a529ed3a9ed6aa0c51a79cf207e026deee2
GIT binary patch
literal 153
zcmeAS@N?(olHy`uVBq!ia0vp^j6iI`!2~2XGqLUlQVE_ejv*C{Z|{2ZH7M}7UYxc)
zn!W8uqtnIQ>_<lqdB{jiFDSaaN3W^xbJMH7CDK7=Q3_$6tQ&<~Cp4L6ZEndC`8;cO
zrss?`_g+2sGU&M|cu~La_w1Rnf~7w`e!jQgteDwDLg6kW!`DinT@0SCelF{r5}E+Y
CM>z8U

literal 0
HcmV?d00001

diff --git a/test-framework/docs/nav_g.png b/test-framework/docs/nav_g.png
new file mode 100644
index 0000000000000000000000000000000000000000..2093a237a94f6c83e19ec6e5fd42f7ddabdafa81
GIT binary patch
literal 95
zcmeAS@N?(olHy`uVBq!ia0vp^j6lrB!3HFm1ilyoDK$?Q$B+ufw|5PB85lU25BhtE
tr?otc=hd~V+ws&_A@j8Fiv!K<?EJwDd;c`qumW{3c)I$ztaD0e0syCC7$E=v

literal 0
HcmV?d00001

diff --git a/test-framework/docs/nav_h.png b/test-framework/docs/nav_h.png
new file mode 100644
index 0000000000000000000000000000000000000000..33389b101d9cd9b4c98ad286b5d9c46a6671f650
GIT binary patch
literal 98
zcmeAS@N?(olHy`uVBq!ia0vp^j6lr8!2~3AUOE6t22D>F$B+ufw|5=67#uj90@pIL
wZ=Q8~_Ju`#59=RjDrmm`tMD@M=!-l18IR?&v<Kx}xDV3h>FVdQ&MBb@0HFXL<NyEw

literal 0
HcmV?d00001

diff --git a/test-framework/docs/open.png b/test-framework/docs/open.png
new file mode 100644
index 0000000000000000000000000000000000000000..30f75c7efe2dd0c9e956e35b69777a02751f048b
GIT binary patch
literal 123
zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1|%O$WD@{VPM$7~Ar*{o?;hlAFyLXmaDC0y
znK1_#cQqJWPES%4Uujug^TE?jMft$}Eq^WaR~)%f)vSNs&gek&x%A9X9sM<Rdl=8h
W@EqZ{ytxBt8iS{+pUXO@geCxcDJg#d

literal 0
HcmV?d00001

diff --git a/test-framework/docs/pages.html b/test-framework/docs/pages.html
new file mode 100644
index 000000000..f5bb03579
--- /dev/null
+++ b/test-framework/docs/pages.html
@@ -0,0 +1,94 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<title>LibDap-test: Related Pages</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+  $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">LibDap-test
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.11 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+  <div id="navrow1" class="tabs">
+    <ul class="tablist">
+      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
+      <li><a href="files.html"><span>Files</span></a></li>
+      <li>
+        <div id="MSearchBox" class="MSearchBoxInactive">
+        <span class="left">
+          <img id="MSearchSelect" src="search/mag_sel.png"
+               onmouseover="return searchBox.OnSearchSelectShow()"
+               onmouseout="return searchBox.OnSearchSelectHide()"
+               alt=""/>
+          <input type="text" id="MSearchField" value="Search" accesskey="S"
+               onfocus="searchBox.OnSearchFieldFocus(true)" 
+               onblur="searchBox.OnSearchFieldFocus(false)" 
+               onkeyup="searchBox.OnSearchFieldChange(event)"/>
+          </span><span class="right">
+            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+          </span>
+        </div>
+      </li>
+    </ul>
+  </div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="header">
+  <div class="headertitle">
+<div class="title">Related Pages</div>  </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock">Here is a list of all related documentation pages:</div><div class="directory">
+<table class="directory">
+<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><a class="el" href="md__home_blus_DemLabs_libdap_MVL_libdap-test_README.html" target="_self">libdap-test</a></td><td class="desc"></td></tr>
+</table>
+</div><!-- directory -->
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.11
+</small></address>
+</body>
+</html>
diff --git a/test-framework/docs/search/all_0.html b/test-framework/docs/search/all_0.html
new file mode 100644
index 000000000..d54e0bd8e
--- /dev/null
+++ b/test-framework/docs/search/all_0.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/test-framework/docs/search/all_0.js b/test-framework/docs/search/all_0.js
new file mode 100644
index 000000000..dd2e0fe40
--- /dev/null
+++ b/test-framework/docs/search/all_0.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['_5fprintrepchar',['_printrepchar',['../dap__test_8c.html#a1afe6d5bf13280151f2bfaae81ac8bab',1,'dap_test.c']]]
+];
diff --git a/test-framework/docs/search/all_1.html b/test-framework/docs/search/all_1.html
new file mode 100644
index 000000000..8cc6a1de9
--- /dev/null
+++ b/test-framework/docs/search/all_1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/test-framework/docs/search/all_1.js b/test-framework/docs/search/all_1.js
new file mode 100644
index 000000000..224d174c4
--- /dev/null
+++ b/test-framework/docs/search/all_1.js
@@ -0,0 +1,5 @@
+var searchData=
+[
+  ['cmake_5fminimum_5frequired',['cmake_minimum_required',['../CMakeLists_8txt.html#a2ed873368192cb7cc113ab2093062d06',1,'CMakeLists.txt']]],
+  ['cmakelists_2etxt',['CMakeLists.txt',['../CMakeLists_8txt.html',1,'']]]
+];
diff --git a/test-framework/docs/search/all_2.html b/test-framework/docs/search/all_2.html
new file mode 100644
index 000000000..d15ac65f7
--- /dev/null
+++ b/test-framework/docs/search/all_2.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_2.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/test-framework/docs/search/all_2.js b/test-framework/docs/search/all_2.js
new file mode 100644
index 000000000..9cb60b2a0
--- /dev/null
+++ b/test-framework/docs/search/all_2.js
@@ -0,0 +1,14 @@
+var searchData=
+[
+  ['dap_5fassert',['dap_assert',['../dap__test_8h.html#aa32aee4a91979a0fabe22cacffe68d83',1,'dap_test.h']]],
+  ['dap_5fassert_5fpif',['dap_assert_PIF',['../dap__test_8h.html#ac37da94c545302fb83d887466c2fb5d0',1,'dap_test.h']]],
+  ['dap_5fdump_5fhex',['dap_dump_hex',['../dap__test_8c.html#a2ea8cdd673adb86824a4dadc9d8301a0',1,'dap_dump_hex(const void *data, size_t size):&#160;dap_test.c'],['../dap__test_8h.html#a2ea8cdd673adb86824a4dadc9d8301a0',1,'dap_dump_hex(const void *data, size_t size):&#160;dap_test.c']]],
+  ['dap_5ffail',['dap_fail',['../dap__test_8h.html#a9802d055159d6b06eb7a34d06b1d4462',1,'dap_test.h']]],
+  ['dap_5fpass_5fmsg',['dap_pass_msg',['../dap__test_8h.html#a4ac9860aafed5e1e68d19a71f70355b3',1,'dap_test.h']]],
+  ['dap_5fprint_5fmodule_5fname',['dap_print_module_name',['../dap__test_8h.html#aea57bd01a18311666642532ef91407c0',1,'dap_test.h']]],
+  ['dap_5ftest_2ec',['dap_test.c',['../dap__test_8c.html',1,'']]],
+  ['dap_5ftest_2eh',['dap_test.h',['../dap__test_8h.html',1,'']]],
+  ['dap_5ftest_5fgenerator_2ec',['dap_test_generator.c',['../dap__test__generator_8c.html',1,'']]],
+  ['dap_5ftest_5fgenerator_2eh',['dap_test_generator.h',['../dap__test__generator_8h.html',1,'']]],
+  ['dap_5ftest_5fmsg',['dap_test_msg',['../dap__test_8h.html#a1364daf3680e471ddfd1ac9567b887be',1,'dap_test.h']]]
+];
diff --git a/test-framework/docs/search/all_3.html b/test-framework/docs/search/all_3.html
new file mode 100644
index 000000000..9f526c67c
--- /dev/null
+++ b/test-framework/docs/search/all_3.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_3.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/test-framework/docs/search/all_3.js b/test-framework/docs/search/all_3.js
new file mode 100644
index 000000000..99e0d185f
--- /dev/null
+++ b/test-framework/docs/search/all_3.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['generate_5frandom_5fbyte_5farray',['generate_random_byte_array',['../dap__test__generator_8c.html#a0c9716d317a4813249aeac91b40329a2',1,'generate_random_byte_array(uint8_t *array, const size_t size, const int BYTE_SIZE):&#160;dap_test_generator.c'],['../dap__test__generator_8h.html#a0c9716d317a4813249aeac91b40329a2',1,'generate_random_byte_array(uint8_t *array, const size_t size, const int BYTE_SIZE):&#160;dap_test_generator.c']]]
+];
diff --git a/test-framework/docs/search/all_4.html b/test-framework/docs/search/all_4.html
new file mode 100644
index 000000000..7b814aa94
--- /dev/null
+++ b/test-framework/docs/search/all_4.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_4.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/test-framework/docs/search/all_4.js b/test-framework/docs/search/all_4.js
new file mode 100644
index 000000000..758537d1e
--- /dev/null
+++ b/test-framework/docs/search/all_4.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['libdap_2dtest',['libdap-test',['../md__home_blus_DemLabs_libdap_MVL_libdap-test_README.html',1,'']]]
+];
diff --git a/test-framework/docs/search/all_5.html b/test-framework/docs/search/all_5.html
new file mode 100644
index 000000000..d8de5560e
--- /dev/null
+++ b/test-framework/docs/search/all_5.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_5.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/test-framework/docs/search/all_5.js b/test-framework/docs/search/all_5.js
new file mode 100644
index 000000000..43cac7878
--- /dev/null
+++ b/test-framework/docs/search/all_5.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['max_5fprint_5fwidth',['MAX_PRINT_WIDTH',['../dap__test_8c.html#abd9e6255b7335bc41294be16a69db676',1,'dap_test.c']]]
+];
diff --git a/test-framework/docs/search/all_6.html b/test-framework/docs/search/all_6.html
new file mode 100644
index 000000000..9ba0cc2b4
--- /dev/null
+++ b/test-framework/docs/search/all_6.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_6.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/test-framework/docs/search/all_6.js b/test-framework/docs/search/all_6.js
new file mode 100644
index 000000000..f1a1f84e3
--- /dev/null
+++ b/test-framework/docs/search/all_6.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['readme_2emd',['README.md',['../README_8md.html',1,'']]]
+];
diff --git a/test-framework/docs/search/all_7.html b/test-framework/docs/search/all_7.html
new file mode 100644
index 000000000..9384ec9b3
--- /dev/null
+++ b/test-framework/docs/search/all_7.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_7.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/test-framework/docs/search/all_7.js b/test-framework/docs/search/all_7.js
new file mode 100644
index 000000000..68d45b0f9
--- /dev/null
+++ b/test-framework/docs/search/all_7.js
@@ -0,0 +1,11 @@
+var searchData=
+[
+  ['text_5fcolor_5fblu',['TEXT_COLOR_BLU',['../dap__test_8h.html#a97de8572e888bea0f33efac1599a5308',1,'dap_test.h']]],
+  ['text_5fcolor_5fcyn',['TEXT_COLOR_CYN',['../dap__test_8h.html#ad0ea07279d343f0fd5b1b1409e131240',1,'dap_test.h']]],
+  ['text_5fcolor_5fgrn',['TEXT_COLOR_GRN',['../dap__test_8h.html#a3558e465da6a25d9ecd34818cdef0f38',1,'dap_test.h']]],
+  ['text_5fcolor_5fmag',['TEXT_COLOR_MAG',['../dap__test_8h.html#a6f533adddd363b4afff300c11dab3c41',1,'dap_test.h']]],
+  ['text_5fcolor_5fred',['TEXT_COLOR_RED',['../dap__test_8h.html#ae6403a24bf4b19d1790870bdb77e0ff6',1,'dap_test.h']]],
+  ['text_5fcolor_5freset',['TEXT_COLOR_RESET',['../dap__test_8h.html#a4588c5e18d03928f2a58e786d028e264',1,'dap_test.h']]],
+  ['text_5fcolor_5fwht',['TEXT_COLOR_WHT',['../dap__test_8h.html#abc00f35dba32197c9c85b1f9915ddb48',1,'dap_test.h']]],
+  ['text_5fcolor_5fyel',['TEXT_COLOR_YEL',['../dap__test_8h.html#a1a8ecbbb90c3fee647a485bb43735a0e',1,'dap_test.h']]]
+];
diff --git a/test-framework/docs/search/close.png b/test-framework/docs/search/close.png
new file mode 100644
index 0000000000000000000000000000000000000000..9342d3dfeea7b7c4ee610987e717804b5a42ceb9
GIT binary patch
literal 273
zcmV+s0q*{ZP)<h;3K|Lk000e1NJLTq000XB000XJ1^@s6sjPP<0002kNkl<Z7#Vd@
zy%I)14BQwM3KSF?L+drXf2Tud1~Vwo-gkQ=D&H2DpWDkOIl+T{-_5ct*tQMlc_NA;
z#Bq!~&yl97kminQn#?$kxUNgzzBUX)lx2ycD8xIC<1djfsKP>4(RlMby96)VwnbG{
zbe&}^BDn7x>$<{ck4zAK-=nT;=hHG)kmplIF${xqm8db3oX6wT3bvp`TE@m0cg;b)
zBuSL}5?N7O(iZLdAlz@)b)Rd~DnSsSX&P5qC`XwuFwcAYLC+d2>+1(8on;wpt8QIC
X2MT$R4iQDd00000NkvXXu0mjfia~GN

literal 0
HcmV?d00001

diff --git a/test-framework/docs/search/defines_0.html b/test-framework/docs/search/defines_0.html
new file mode 100644
index 000000000..17cfaa2ce
--- /dev/null
+++ b/test-framework/docs/search/defines_0.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="defines_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/test-framework/docs/search/defines_0.js b/test-framework/docs/search/defines_0.js
new file mode 100644
index 000000000..b7365050f
--- /dev/null
+++ b/test-framework/docs/search/defines_0.js
@@ -0,0 +1,9 @@
+var searchData=
+[
+  ['dap_5fassert',['dap_assert',['../dap__test_8h.html#aa32aee4a91979a0fabe22cacffe68d83',1,'dap_test.h']]],
+  ['dap_5fassert_5fpif',['dap_assert_PIF',['../dap__test_8h.html#ac37da94c545302fb83d887466c2fb5d0',1,'dap_test.h']]],
+  ['dap_5ffail',['dap_fail',['../dap__test_8h.html#a9802d055159d6b06eb7a34d06b1d4462',1,'dap_test.h']]],
+  ['dap_5fpass_5fmsg',['dap_pass_msg',['../dap__test_8h.html#a4ac9860aafed5e1e68d19a71f70355b3',1,'dap_test.h']]],
+  ['dap_5fprint_5fmodule_5fname',['dap_print_module_name',['../dap__test_8h.html#aea57bd01a18311666642532ef91407c0',1,'dap_test.h']]],
+  ['dap_5ftest_5fmsg',['dap_test_msg',['../dap__test_8h.html#a1364daf3680e471ddfd1ac9567b887be',1,'dap_test.h']]]
+];
diff --git a/test-framework/docs/search/defines_1.html b/test-framework/docs/search/defines_1.html
new file mode 100644
index 000000000..5c0025e2a
--- /dev/null
+++ b/test-framework/docs/search/defines_1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="defines_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/test-framework/docs/search/defines_1.js b/test-framework/docs/search/defines_1.js
new file mode 100644
index 000000000..43cac7878
--- /dev/null
+++ b/test-framework/docs/search/defines_1.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['max_5fprint_5fwidth',['MAX_PRINT_WIDTH',['../dap__test_8c.html#abd9e6255b7335bc41294be16a69db676',1,'dap_test.c']]]
+];
diff --git a/test-framework/docs/search/defines_2.html b/test-framework/docs/search/defines_2.html
new file mode 100644
index 000000000..a206bfcf2
--- /dev/null
+++ b/test-framework/docs/search/defines_2.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="defines_2.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/test-framework/docs/search/defines_2.js b/test-framework/docs/search/defines_2.js
new file mode 100644
index 000000000..68d45b0f9
--- /dev/null
+++ b/test-framework/docs/search/defines_2.js
@@ -0,0 +1,11 @@
+var searchData=
+[
+  ['text_5fcolor_5fblu',['TEXT_COLOR_BLU',['../dap__test_8h.html#a97de8572e888bea0f33efac1599a5308',1,'dap_test.h']]],
+  ['text_5fcolor_5fcyn',['TEXT_COLOR_CYN',['../dap__test_8h.html#ad0ea07279d343f0fd5b1b1409e131240',1,'dap_test.h']]],
+  ['text_5fcolor_5fgrn',['TEXT_COLOR_GRN',['../dap__test_8h.html#a3558e465da6a25d9ecd34818cdef0f38',1,'dap_test.h']]],
+  ['text_5fcolor_5fmag',['TEXT_COLOR_MAG',['../dap__test_8h.html#a6f533adddd363b4afff300c11dab3c41',1,'dap_test.h']]],
+  ['text_5fcolor_5fred',['TEXT_COLOR_RED',['../dap__test_8h.html#ae6403a24bf4b19d1790870bdb77e0ff6',1,'dap_test.h']]],
+  ['text_5fcolor_5freset',['TEXT_COLOR_RESET',['../dap__test_8h.html#a4588c5e18d03928f2a58e786d028e264',1,'dap_test.h']]],
+  ['text_5fcolor_5fwht',['TEXT_COLOR_WHT',['../dap__test_8h.html#abc00f35dba32197c9c85b1f9915ddb48',1,'dap_test.h']]],
+  ['text_5fcolor_5fyel',['TEXT_COLOR_YEL',['../dap__test_8h.html#a1a8ecbbb90c3fee647a485bb43735a0e',1,'dap_test.h']]]
+];
diff --git a/test-framework/docs/search/files_0.html b/test-framework/docs/search/files_0.html
new file mode 100644
index 000000000..0b637cf9c
--- /dev/null
+++ b/test-framework/docs/search/files_0.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="files_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/test-framework/docs/search/files_0.js b/test-framework/docs/search/files_0.js
new file mode 100644
index 000000000..85939305a
--- /dev/null
+++ b/test-framework/docs/search/files_0.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['cmakelists_2etxt',['CMakeLists.txt',['../CMakeLists_8txt.html',1,'']]]
+];
diff --git a/test-framework/docs/search/files_1.html b/test-framework/docs/search/files_1.html
new file mode 100644
index 000000000..1094e74a4
--- /dev/null
+++ b/test-framework/docs/search/files_1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="files_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/test-framework/docs/search/files_1.js b/test-framework/docs/search/files_1.js
new file mode 100644
index 000000000..4680bef00
--- /dev/null
+++ b/test-framework/docs/search/files_1.js
@@ -0,0 +1,7 @@
+var searchData=
+[
+  ['dap_5ftest_2ec',['dap_test.c',['../dap__test_8c.html',1,'']]],
+  ['dap_5ftest_2eh',['dap_test.h',['../dap__test_8h.html',1,'']]],
+  ['dap_5ftest_5fgenerator_2ec',['dap_test_generator.c',['../dap__test__generator_8c.html',1,'']]],
+  ['dap_5ftest_5fgenerator_2eh',['dap_test_generator.h',['../dap__test__generator_8h.html',1,'']]]
+];
diff --git a/test-framework/docs/search/files_2.html b/test-framework/docs/search/files_2.html
new file mode 100644
index 000000000..a08dbd36c
--- /dev/null
+++ b/test-framework/docs/search/files_2.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="files_2.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/test-framework/docs/search/files_2.js b/test-framework/docs/search/files_2.js
new file mode 100644
index 000000000..f1a1f84e3
--- /dev/null
+++ b/test-framework/docs/search/files_2.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['readme_2emd',['README.md',['../README_8md.html',1,'']]]
+];
diff --git a/test-framework/docs/search/functions_0.html b/test-framework/docs/search/functions_0.html
new file mode 100644
index 000000000..6bc52b619
--- /dev/null
+++ b/test-framework/docs/search/functions_0.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/test-framework/docs/search/functions_0.js b/test-framework/docs/search/functions_0.js
new file mode 100644
index 000000000..dd2e0fe40
--- /dev/null
+++ b/test-framework/docs/search/functions_0.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['_5fprintrepchar',['_printrepchar',['../dap__test_8c.html#a1afe6d5bf13280151f2bfaae81ac8bab',1,'dap_test.c']]]
+];
diff --git a/test-framework/docs/search/functions_1.html b/test-framework/docs/search/functions_1.html
new file mode 100644
index 000000000..648831fd7
--- /dev/null
+++ b/test-framework/docs/search/functions_1.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_1.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/test-framework/docs/search/functions_1.js b/test-framework/docs/search/functions_1.js
new file mode 100644
index 000000000..e45c8ccc4
--- /dev/null
+++ b/test-framework/docs/search/functions_1.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['cmake_5fminimum_5frequired',['cmake_minimum_required',['../CMakeLists_8txt.html#a2ed873368192cb7cc113ab2093062d06',1,'CMakeLists.txt']]]
+];
diff --git a/test-framework/docs/search/functions_2.html b/test-framework/docs/search/functions_2.html
new file mode 100644
index 000000000..c93d08946
--- /dev/null
+++ b/test-framework/docs/search/functions_2.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_2.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/test-framework/docs/search/functions_2.js b/test-framework/docs/search/functions_2.js
new file mode 100644
index 000000000..4cbe68fba
--- /dev/null
+++ b/test-framework/docs/search/functions_2.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['dap_5fdump_5fhex',['dap_dump_hex',['../dap__test_8c.html#a2ea8cdd673adb86824a4dadc9d8301a0',1,'dap_dump_hex(const void *data, size_t size):&#160;dap_test.c'],['../dap__test_8h.html#a2ea8cdd673adb86824a4dadc9d8301a0',1,'dap_dump_hex(const void *data, size_t size):&#160;dap_test.c']]]
+];
diff --git a/test-framework/docs/search/functions_3.html b/test-framework/docs/search/functions_3.html
new file mode 100644
index 000000000..caa48ea26
--- /dev/null
+++ b/test-framework/docs/search/functions_3.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="functions_3.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/test-framework/docs/search/functions_3.js b/test-framework/docs/search/functions_3.js
new file mode 100644
index 000000000..99e0d185f
--- /dev/null
+++ b/test-framework/docs/search/functions_3.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['generate_5frandom_5fbyte_5farray',['generate_random_byte_array',['../dap__test__generator_8c.html#a0c9716d317a4813249aeac91b40329a2',1,'generate_random_byte_array(uint8_t *array, const size_t size, const int BYTE_SIZE):&#160;dap_test_generator.c'],['../dap__test__generator_8h.html#a0c9716d317a4813249aeac91b40329a2',1,'generate_random_byte_array(uint8_t *array, const size_t size, const int BYTE_SIZE):&#160;dap_test_generator.c']]]
+];
diff --git a/test-framework/docs/search/mag_sel.png b/test-framework/docs/search/mag_sel.png
new file mode 100644
index 0000000000000000000000000000000000000000..81f6040a2092402b4d98f9ffa8855d12a0d4ca17
GIT binary patch
literal 563
zcmV-30?hr1P)<h;3K|Lk000e1NJLTq000yK000vR1^@s6kc=(000009a7bBm000XU
z000XU0RWnu7ytkOAY({UO#lFGm;eBCjsO7QH~;{G)c^o`2LJ%dv;Y7zL;wIBc7!%6
zy#N3Kxk*GpRCwCtl)H)|K@^6++7>zxx&tqG15pu7)IiiXFflOc2k;dXd>%13GZAy?
zRz!q0=|E6a6vV)&ZBS~G9oe0kbqyw1*gvY`{Pop2oKq#FlzgXt@Xh-7fxh>}`Fxg>
z$%N%{$!4=5nM{(;=c!aG1Ofr^Do{u%Ih{^&Fc@H2)+a-?TBXrw5DW&z%Nb6mQ!L9O
zl}b@6mB?f=tX3;#vl)}ggh(Vpy<UI4WZSj@D3{ArDit(M6QNK@DvH8-y~eg}>h(IK
z(Mb0D{l{U$FsRjP;!{($+bsaaVi8T#1c0V#qEIOCYa9@UVLV`f__E81L;?WEaRA;Y
zUH;rZ;vb;mk7JX|<p3Cu$C##x>$=i3O~&If0O@oZfLg8gfIjW=dcBsz;gI=!{-r4#
z4%6v$&~;q^j7Fo67yJ(NJWuX+I~I!tj^nW3?}^9bq|<3^+vapS5sgM^x7!cs(+mMT
z&y%j};&~po+YO)3hoUH4E*E;e9>?R6SS&`X)p`njycAVcg{rEb41T{~Hk(bl-7eSb
zmFxA2uIqo#@R?lKm50ND`~6Nfn|-b1|L6O98vt3Tx@gKz#isxO002ovPDHLkV1kyW
B_l^Jn

literal 0
HcmV?d00001

diff --git a/test-framework/docs/search/nomatches.html b/test-framework/docs/search/nomatches.html
new file mode 100644
index 000000000..b1ded27e9
--- /dev/null
+++ b/test-framework/docs/search/nomatches.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="NoMatches">No Matches</div>
+</div>
+</body>
+</html>
diff --git a/test-framework/docs/search/pages_0.html b/test-framework/docs/search/pages_0.html
new file mode 100644
index 000000000..0db7267ba
--- /dev/null
+++ b/test-framework/docs/search/pages_0.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.11"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="pages_0.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/test-framework/docs/search/pages_0.js b/test-framework/docs/search/pages_0.js
new file mode 100644
index 000000000..758537d1e
--- /dev/null
+++ b/test-framework/docs/search/pages_0.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['libdap_2dtest',['libdap-test',['../md__home_blus_DemLabs_libdap_MVL_libdap-test_README.html',1,'']]]
+];
diff --git a/test-framework/docs/search/search.css b/test-framework/docs/search/search.css
new file mode 100644
index 000000000..4d7612ff6
--- /dev/null
+++ b/test-framework/docs/search/search.css
@@ -0,0 +1,271 @@
+/*---------------- Search Box */
+
+#FSearchBox {
+    float: left;
+}
+
+#MSearchBox {
+    white-space : nowrap;
+    position: absolute;
+    float: none;
+    display: inline;
+    margin-top: 8px;
+    right: 0px;
+    width: 170px;
+    z-index: 102;
+    background-color: white;
+}
+
+#MSearchBox .left
+{
+    display:block;
+    position:absolute;
+    left:10px;
+    width:20px;
+    height:19px;
+    background:url('search_l.png') no-repeat;
+    background-position:right;
+}
+
+#MSearchSelect {
+    display:block;
+    position:absolute;
+    width:20px;
+    height:19px;
+}
+
+.left #MSearchSelect {
+    left:4px;
+}
+
+.right #MSearchSelect {
+    right:5px;
+}
+
+#MSearchField {
+    display:block;
+    position:absolute;
+    height:19px;
+    background:url('search_m.png') repeat-x;
+    border:none;
+    width:111px;
+    margin-left:20px;
+    padding-left:4px;
+    color: #909090;
+    outline: none;
+    font: 9pt Arial, Verdana, sans-serif;
+}
+
+#FSearchBox #MSearchField {
+    margin-left:15px;
+}
+
+#MSearchBox .right {
+    display:block;
+    position:absolute;
+    right:10px;
+    top:0px;
+    width:20px;
+    height:19px;
+    background:url('search_r.png') no-repeat;
+    background-position:left;
+}
+
+#MSearchClose {
+    display: none;
+    position: absolute;
+    top: 4px;
+    background : none;
+    border: none;
+    margin: 0px 4px 0px 0px;
+    padding: 0px 0px;
+    outline: none;
+}
+
+.left #MSearchClose {
+    left: 6px;
+}
+
+.right #MSearchClose {
+    right: 2px;
+}
+
+.MSearchBoxActive #MSearchField {
+    color: #000000;
+}
+
+/*---------------- Search filter selection */
+
+#MSearchSelectWindow {
+    display: none;
+    position: absolute;
+    left: 0; top: 0;
+    border: 1px solid #90A5CE;
+    background-color: #F9FAFC;
+    z-index: 1;
+    padding-top: 4px;
+    padding-bottom: 4px;
+    -moz-border-radius: 4px;
+    -webkit-border-top-left-radius: 4px;
+    -webkit-border-top-right-radius: 4px;
+    -webkit-border-bottom-left-radius: 4px;
+    -webkit-border-bottom-right-radius: 4px;
+    -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+}
+
+.SelectItem {
+    font: 8pt Arial, Verdana, sans-serif;
+    padding-left:  2px;
+    padding-right: 12px;
+    border: 0px;
+}
+
+span.SelectionMark {
+    margin-right: 4px;
+    font-family: monospace;
+    outline-style: none;
+    text-decoration: none;
+}
+
+a.SelectItem {
+    display: block;
+    outline-style: none;
+    color: #000000; 
+    text-decoration: none;
+    padding-left:   6px;
+    padding-right: 12px;
+}
+
+a.SelectItem:focus,
+a.SelectItem:active {
+    color: #000000; 
+    outline-style: none;
+    text-decoration: none;
+}
+
+a.SelectItem:hover {
+    color: #FFFFFF;
+    background-color: #3D578C;
+    outline-style: none;
+    text-decoration: none;
+    cursor: pointer;
+    display: block;
+}
+
+/*---------------- Search results window */
+
+iframe#MSearchResults {
+    width: 60ex;
+    height: 15em;
+}
+
+#MSearchResultsWindow {
+    display: none;
+    position: absolute;
+    left: 0; top: 0;
+    border: 1px solid #000;
+    background-color: #EEF1F7;
+}
+
+/* ----------------------------------- */
+
+
+#SRIndex {
+    clear:both; 
+    padding-bottom: 15px;
+}
+
+.SREntry {
+    font-size: 10pt;
+    padding-left: 1ex;
+}
+
+.SRPage .SREntry {
+    font-size: 8pt;
+    padding: 1px 5px;
+}
+
+body.SRPage {
+    margin: 5px 2px;
+}
+
+.SRChildren {
+    padding-left: 3ex; padding-bottom: .5em 
+}
+
+.SRPage .SRChildren {
+    display: none;
+}
+
+.SRSymbol {
+    font-weight: bold; 
+    color: #425E97;
+    font-family: Arial, Verdana, sans-serif;
+    text-decoration: none;
+    outline: none;
+}
+
+a.SRScope {
+    display: block;
+    color: #425E97; 
+    font-family: Arial, Verdana, sans-serif;
+    text-decoration: none;
+    outline: none;
+}
+
+a.SRSymbol:focus, a.SRSymbol:active,
+a.SRScope:focus, a.SRScope:active {
+    text-decoration: underline;
+}
+
+span.SRScope {
+    padding-left: 4px;
+}
+
+.SRPage .SRStatus {
+    padding: 2px 5px;
+    font-size: 8pt;
+    font-style: italic;
+}
+
+.SRResult {
+    display: none;
+}
+
+DIV.searchresults {
+    margin-left: 10px;
+    margin-right: 10px;
+}
+
+/*---------------- External search page results */
+
+.searchresult {
+    background-color: #F0F3F8;
+}
+
+.pages b {
+   color: white;
+   padding: 5px 5px 3px 5px;
+   background-image: url("../tab_a.png");
+   background-repeat: repeat-x;
+   text-shadow: 0 1px 1px #000000;
+}
+
+.pages {
+    line-height: 17px;
+    margin-left: 4px;
+    text-decoration: none;
+}
+
+.hl {
+    font-weight: bold;
+}
+
+#searchresults {
+    margin-bottom: 20px;
+}
+
+.searchpages {
+    margin-top: 10px;
+}
+
diff --git a/test-framework/docs/search/search.js b/test-framework/docs/search/search.js
new file mode 100644
index 000000000..dedce3bf0
--- /dev/null
+++ b/test-framework/docs/search/search.js
@@ -0,0 +1,791 @@
+function convertToId(search)
+{
+  var result = '';
+  for (i=0;i<search.length;i++)
+  {
+    var c = search.charAt(i);
+    var cn = c.charCodeAt(0);
+    if (c.match(/[a-z0-9\u0080-\uFFFF]/))
+    {
+      result+=c;
+    }
+    else if (cn<16)
+    {
+      result+="_0"+cn.toString(16);
+    }
+    else
+    {
+      result+="_"+cn.toString(16);
+    }
+  }
+  return result;
+}
+
+function getXPos(item)
+{
+  var x = 0;
+  if (item.offsetWidth)
+  {
+    while (item && item!=document.body)
+    {
+      x   += item.offsetLeft;
+      item = item.offsetParent;
+    }
+  }
+  return x;
+}
+
+function getYPos(item)
+{
+  var y = 0;
+  if (item.offsetWidth)
+  {
+     while (item && item!=document.body)
+     {
+       y   += item.offsetTop;
+       item = item.offsetParent;
+     }
+  }
+  return y;
+}
+
+/* A class handling everything associated with the search panel.
+
+   Parameters:
+   name - The name of the global variable that will be
+          storing this instance.  Is needed to be able to set timeouts.
+   resultPath - path to use for external files
+*/
+function SearchBox(name, resultsPath, inFrame, label)
+{
+  if (!name || !resultsPath) {  alert("Missing parameters to SearchBox."); }
+
+  // ---------- Instance variables
+  this.name                  = name;
+  this.resultsPath           = resultsPath;
+  this.keyTimeout            = 0;
+  this.keyTimeoutLength      = 500;
+  this.closeSelectionTimeout = 300;
+  this.lastSearchValue       = "";
+  this.lastResultsPage       = "";
+  this.hideTimeout           = 0;
+  this.searchIndex           = 0;
+  this.searchActive          = false;
+  this.insideFrame           = inFrame;
+  this.searchLabel           = label;
+
+  // ----------- DOM Elements
+
+  this.DOMSearchField = function()
+  {  return document.getElementById("MSearchField");  }
+
+  this.DOMSearchSelect = function()
+  {  return document.getElementById("MSearchSelect");  }
+
+  this.DOMSearchSelectWindow = function()
+  {  return document.getElementById("MSearchSelectWindow");  }
+
+  this.DOMPopupSearchResults = function()
+  {  return document.getElementById("MSearchResults");  }
+
+  this.DOMPopupSearchResultsWindow = function()
+  {  return document.getElementById("MSearchResultsWindow");  }
+
+  this.DOMSearchClose = function()
+  {  return document.getElementById("MSearchClose"); }
+
+  this.DOMSearchBox = function()
+  {  return document.getElementById("MSearchBox");  }
+
+  // ------------ Event Handlers
+
+  // Called when focus is added or removed from the search field.
+  this.OnSearchFieldFocus = function(isActive)
+  {
+    this.Activate(isActive);
+  }
+
+  this.OnSearchSelectShow = function()
+  {
+    var searchSelectWindow = this.DOMSearchSelectWindow();
+    var searchField        = this.DOMSearchSelect();
+
+    if (this.insideFrame)
+    {
+      var left = getXPos(searchField);
+      var top  = getYPos(searchField);
+      left += searchField.offsetWidth + 6;
+      top += searchField.offsetHeight;
+
+      // show search selection popup
+      searchSelectWindow.style.display='block';
+      left -= searchSelectWindow.offsetWidth;
+      searchSelectWindow.style.left =  left + 'px';
+      searchSelectWindow.style.top  =  top  + 'px';
+    }
+    else
+    {
+      var left = getXPos(searchField);
+      var top  = getYPos(searchField);
+      top += searchField.offsetHeight;
+
+      // show search selection popup
+      searchSelectWindow.style.display='block';
+      searchSelectWindow.style.left =  left + 'px';
+      searchSelectWindow.style.top  =  top  + 'px';
+    }
+
+    // stop selection hide timer
+    if (this.hideTimeout)
+    {
+      clearTimeout(this.hideTimeout);
+      this.hideTimeout=0;
+    }
+    return false; // to avoid "image drag" default event
+  }
+
+  this.OnSearchSelectHide = function()
+  {
+    this.hideTimeout = setTimeout(this.name +".CloseSelectionWindow()",
+                                  this.closeSelectionTimeout);
+  }
+
+  // Called when the content of the search field is changed.
+  this.OnSearchFieldChange = function(evt)
+  {
+    if (this.keyTimeout) // kill running timer
+    {
+      clearTimeout(this.keyTimeout);
+      this.keyTimeout = 0;
+    }
+
+    var e  = (evt) ? evt : window.event; // for IE
+    if (e.keyCode==40 || e.keyCode==13)
+    {
+      if (e.shiftKey==1)
+      {
+        this.OnSearchSelectShow();
+        var win=this.DOMSearchSelectWindow();
+        for (i=0;i<win.childNodes.length;i++)
+        {
+          var child = win.childNodes[i]; // get span within a
+          if (child.className=='SelectItem')
+          {
+            child.focus();
+            return;
+          }
+        }
+        return;
+      }
+      else if (window.frames.MSearchResults.searchResults)
+      {
+        var elem = window.frames.MSearchResults.searchResults.NavNext(0);
+        if (elem) elem.focus();
+      }
+    }
+    else if (e.keyCode==27) // Escape out of the search field
+    {
+      this.DOMSearchField().blur();
+      this.DOMPopupSearchResultsWindow().style.display = 'none';
+      this.DOMSearchClose().style.display = 'none';
+      this.lastSearchValue = '';
+      this.Activate(false);
+      return;
+    }
+
+    // strip whitespaces
+    var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
+
+    if (searchValue != this.lastSearchValue) // search value has changed
+    {
+      if (searchValue != "") // non-empty search
+      {
+        // set timer for search update
+        this.keyTimeout = setTimeout(this.name + '.Search()',
+                                     this.keyTimeoutLength);
+      }
+      else // empty search field
+      {
+        this.DOMPopupSearchResultsWindow().style.display = 'none';
+        this.DOMSearchClose().style.display = 'none';
+        this.lastSearchValue = '';
+      }
+    }
+  }
+
+  this.SelectItemCount = function(id)
+  {
+    var count=0;
+    var win=this.DOMSearchSelectWindow();
+    for (i=0;i<win.childNodes.length;i++)
+    {
+      var child = win.childNodes[i]; // get span within a
+      if (child.className=='SelectItem')
+      {
+        count++;
+      }
+    }
+    return count;
+  }
+
+  this.SelectItemSet = function(id)
+  {
+    var i,j=0;
+    var win=this.DOMSearchSelectWindow();
+    for (i=0;i<win.childNodes.length;i++)
+    {
+      var child = win.childNodes[i]; // get span within a
+      if (child.className=='SelectItem')
+      {
+        var node = child.firstChild;
+        if (j==id)
+        {
+          node.innerHTML='&#8226;';
+        }
+        else
+        {
+          node.innerHTML='&#160;';
+        }
+        j++;
+      }
+    }
+  }
+
+  // Called when an search filter selection is made.
+  // set item with index id as the active item
+  this.OnSelectItem = function(id)
+  {
+    this.searchIndex = id;
+    this.SelectItemSet(id);
+    var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
+    if (searchValue!="" && this.searchActive) // something was found -> do a search
+    {
+      this.Search();
+    }
+  }
+
+  this.OnSearchSelectKey = function(evt)
+  {
+    var e = (evt) ? evt : window.event; // for IE
+    if (e.keyCode==40 && this.searchIndex<this.SelectItemCount()) // Down
+    {
+      this.searchIndex++;
+      this.OnSelectItem(this.searchIndex);
+    }
+    else if (e.keyCode==38 && this.searchIndex>0) // Up
+    {
+      this.searchIndex--;
+      this.OnSelectItem(this.searchIndex);
+    }
+    else if (e.keyCode==13 || e.keyCode==27)
+    {
+      this.OnSelectItem(this.searchIndex);
+      this.CloseSelectionWindow();
+      this.DOMSearchField().focus();
+    }
+    return false;
+  }
+
+  // --------- Actions
+
+  // Closes the results window.
+  this.CloseResultsWindow = function()
+  {
+    this.DOMPopupSearchResultsWindow().style.display = 'none';
+    this.DOMSearchClose().style.display = 'none';
+    this.Activate(false);
+  }
+
+  this.CloseSelectionWindow = function()
+  {
+    this.DOMSearchSelectWindow().style.display = 'none';
+  }
+
+  // Performs a search.
+  this.Search = function()
+  {
+    this.keyTimeout = 0;
+
+    // strip leading whitespace
+    var searchValue = this.DOMSearchField().value.replace(/^ +/, "");
+
+    var code = searchValue.toLowerCase().charCodeAt(0);
+    var idxChar = searchValue.substr(0, 1).toLowerCase();
+    if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair
+    {
+      idxChar = searchValue.substr(0, 2);
+    }
+
+    var resultsPage;
+    var resultsPageWithSearch;
+    var hasResultsPage;
+
+    var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar);
+    if (idx!=-1)
+    {
+       var hexCode=idx.toString(16);
+       resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html';
+       resultsPageWithSearch = resultsPage+'?'+escape(searchValue);
+       hasResultsPage = true;
+    }
+    else // nothing available for this search term
+    {
+       resultsPage = this.resultsPath + '/nomatches.html';
+       resultsPageWithSearch = resultsPage;
+       hasResultsPage = false;
+    }
+
+    window.frames.MSearchResults.location = resultsPageWithSearch;
+    var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();
+
+    if (domPopupSearchResultsWindow.style.display!='block')
+    {
+       var domSearchBox = this.DOMSearchBox();
+       this.DOMSearchClose().style.display = 'inline';
+       if (this.insideFrame)
+       {
+         var domPopupSearchResults = this.DOMPopupSearchResults();
+         domPopupSearchResultsWindow.style.position = 'relative';
+         domPopupSearchResultsWindow.style.display  = 'block';
+         var width = document.body.clientWidth - 8; // the -8 is for IE :-(
+         domPopupSearchResultsWindow.style.width    = width + 'px';
+         domPopupSearchResults.style.width          = width + 'px';
+       }
+       else
+       {
+         var domPopupSearchResults = this.DOMPopupSearchResults();
+         var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth;
+         var top  = getYPos(domSearchBox) + 20;  // domSearchBox.offsetHeight + 1;
+         domPopupSearchResultsWindow.style.display = 'block';
+         left -= domPopupSearchResults.offsetWidth;
+         domPopupSearchResultsWindow.style.top     = top  + 'px';
+         domPopupSearchResultsWindow.style.left    = left + 'px';
+       }
+    }
+
+    this.lastSearchValue = searchValue;
+    this.lastResultsPage = resultsPage;
+  }
+
+  // -------- Activation Functions
+
+  // Activates or deactivates the search panel, resetting things to
+  // their default values if necessary.
+  this.Activate = function(isActive)
+  {
+    if (isActive || // open it
+        this.DOMPopupSearchResultsWindow().style.display == 'block'
+       )
+    {
+      this.DOMSearchBox().className = 'MSearchBoxActive';
+
+      var searchField = this.DOMSearchField();
+
+      if (searchField.value == this.searchLabel) // clear "Search" term upon entry
+      {
+        searchField.value = '';
+        this.searchActive = true;
+      }
+    }
+    else if (!isActive) // directly remove the panel
+    {
+      this.DOMSearchBox().className = 'MSearchBoxInactive';
+      this.DOMSearchField().value   = this.searchLabel;
+      this.searchActive             = false;
+      this.lastSearchValue          = ''
+      this.lastResultsPage          = '';
+    }
+  }
+}
+
+// -----------------------------------------------------------------------
+
+// The class that handles everything on the search results page.
+function SearchResults(name)
+{
+    // The number of matches from the last run of <Search()>.
+    this.lastMatchCount = 0;
+    this.lastKey = 0;
+    this.repeatOn = false;
+
+    // Toggles the visibility of the passed element ID.
+    this.FindChildElement = function(id)
+    {
+      var parentElement = document.getElementById(id);
+      var element = parentElement.firstChild;
+
+      while (element && element!=parentElement)
+      {
+        if (element.nodeName == 'DIV' && element.className == 'SRChildren')
+        {
+          return element;
+        }
+
+        if (element.nodeName == 'DIV' && element.hasChildNodes())
+        {
+           element = element.firstChild;
+        }
+        else if (element.nextSibling)
+        {
+           element = element.nextSibling;
+        }
+        else
+        {
+          do
+          {
+            element = element.parentNode;
+          }
+          while (element && element!=parentElement && !element.nextSibling);
+
+          if (element && element!=parentElement)
+          {
+            element = element.nextSibling;
+          }
+        }
+      }
+    }
+
+    this.Toggle = function(id)
+    {
+      var element = this.FindChildElement(id);
+      if (element)
+      {
+        if (element.style.display == 'block')
+        {
+          element.style.display = 'none';
+        }
+        else
+        {
+          element.style.display = 'block';
+        }
+      }
+    }
+
+    // Searches for the passed string.  If there is no parameter,
+    // it takes it from the URL query.
+    //
+    // Always returns true, since other documents may try to call it
+    // and that may or may not be possible.
+    this.Search = function(search)
+    {
+      if (!search) // get search word from URL
+      {
+        search = window.location.search;
+        search = search.substring(1);  // Remove the leading '?'
+        search = unescape(search);
+      }
+
+      search = search.replace(/^ +/, ""); // strip leading spaces
+      search = search.replace(/ +$/, ""); // strip trailing spaces
+      search = search.toLowerCase();
+      search = convertToId(search);
+
+      var resultRows = document.getElementsByTagName("div");
+      var matches = 0;
+
+      var i = 0;
+      while (i < resultRows.length)
+      {
+        var row = resultRows.item(i);
+        if (row.className == "SRResult")
+        {
+          var rowMatchName = row.id.toLowerCase();
+          rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_'
+
+          if (search.length<=rowMatchName.length &&
+             rowMatchName.substr(0, search.length)==search)
+          {
+            row.style.display = 'block';
+            matches++;
+          }
+          else
+          {
+            row.style.display = 'none';
+          }
+        }
+        i++;
+      }
+      document.getElementById("Searching").style.display='none';
+      if (matches == 0) // no results
+      {
+        document.getElementById("NoMatches").style.display='block';
+      }
+      else // at least one result
+      {
+        document.getElementById("NoMatches").style.display='none';
+      }
+      this.lastMatchCount = matches;
+      return true;
+    }
+
+    // return the first item with index index or higher that is visible
+    this.NavNext = function(index)
+    {
+      var focusItem;
+      while (1)
+      {
+        var focusName = 'Item'+index;
+        focusItem = document.getElementById(focusName);
+        if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
+        {
+          break;
+        }
+        else if (!focusItem) // last element
+        {
+          break;
+        }
+        focusItem=null;
+        index++;
+      }
+      return focusItem;
+    }
+
+    this.NavPrev = function(index)
+    {
+      var focusItem;
+      while (1)
+      {
+        var focusName = 'Item'+index;
+        focusItem = document.getElementById(focusName);
+        if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
+        {
+          break;
+        }
+        else if (!focusItem) // last element
+        {
+          break;
+        }
+        focusItem=null;
+        index--;
+      }
+      return focusItem;
+    }
+
+    this.ProcessKeys = function(e)
+    {
+      if (e.type == "keydown")
+      {
+        this.repeatOn = false;
+        this.lastKey = e.keyCode;
+      }
+      else if (e.type == "keypress")
+      {
+        if (!this.repeatOn)
+        {
+          if (this.lastKey) this.repeatOn = true;
+          return false; // ignore first keypress after keydown
+        }
+      }
+      else if (e.type == "keyup")
+      {
+        this.lastKey = 0;
+        this.repeatOn = false;
+      }
+      return this.lastKey!=0;
+    }
+
+    this.Nav = function(evt,itemIndex)
+    {
+      var e  = (evt) ? evt : window.event; // for IE
+      if (e.keyCode==13) return true;
+      if (!this.ProcessKeys(e)) return false;
+
+      if (this.lastKey==38) // Up
+      {
+        var newIndex = itemIndex-1;
+        var focusItem = this.NavPrev(newIndex);
+        if (focusItem)
+        {
+          var child = this.FindChildElement(focusItem.parentNode.parentNode.id);
+          if (child && child.style.display == 'block') // children visible
+          {
+            var n=0;
+            var tmpElem;
+            while (1) // search for last child
+            {
+              tmpElem = document.getElementById('Item'+newIndex+'_c'+n);
+              if (tmpElem)
+              {
+                focusItem = tmpElem;
+              }
+              else // found it!
+              {
+                break;
+              }
+              n++;
+            }
+          }
+        }
+        if (focusItem)
+        {
+          focusItem.focus();
+        }
+        else // return focus to search field
+        {
+           parent.document.getElementById("MSearchField").focus();
+        }
+      }
+      else if (this.lastKey==40) // Down
+      {
+        var newIndex = itemIndex+1;
+        var focusItem;
+        var item = document.getElementById('Item'+itemIndex);
+        var elem = this.FindChildElement(item.parentNode.parentNode.id);
+        if (elem && elem.style.display == 'block') // children visible
+        {
+          focusItem = document.getElementById('Item'+itemIndex+'_c0');
+        }
+        if (!focusItem) focusItem = this.NavNext(newIndex);
+        if (focusItem)  focusItem.focus();
+      }
+      else if (this.lastKey==39) // Right
+      {
+        var item = document.getElementById('Item'+itemIndex);
+        var elem = this.FindChildElement(item.parentNode.parentNode.id);
+        if (elem) elem.style.display = 'block';
+      }
+      else if (this.lastKey==37) // Left
+      {
+        var item = document.getElementById('Item'+itemIndex);
+        var elem = this.FindChildElement(item.parentNode.parentNode.id);
+        if (elem) elem.style.display = 'none';
+      }
+      else if (this.lastKey==27) // Escape
+      {
+        parent.searchBox.CloseResultsWindow();
+        parent.document.getElementById("MSearchField").focus();
+      }
+      else if (this.lastKey==13) // Enter
+      {
+        return true;
+      }
+      return false;
+    }
+
+    this.NavChild = function(evt,itemIndex,childIndex)
+    {
+      var e  = (evt) ? evt : window.event; // for IE
+      if (e.keyCode==13) return true;
+      if (!this.ProcessKeys(e)) return false;
+
+      if (this.lastKey==38) // Up
+      {
+        if (childIndex>0)
+        {
+          var newIndex = childIndex-1;
+          document.getElementById('Item'+itemIndex+'_c'+newIndex).focus();
+        }
+        else // already at first child, jump to parent
+        {
+          document.getElementById('Item'+itemIndex).focus();
+        }
+      }
+      else if (this.lastKey==40) // Down
+      {
+        var newIndex = childIndex+1;
+        var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex);
+        if (!elem) // last child, jump to parent next parent
+        {
+          elem = this.NavNext(itemIndex+1);
+        }
+        if (elem)
+        {
+          elem.focus();
+        }
+      }
+      else if (this.lastKey==27) // Escape
+      {
+        parent.searchBox.CloseResultsWindow();
+        parent.document.getElementById("MSearchField").focus();
+      }
+      else if (this.lastKey==13) // Enter
+      {
+        return true;
+      }
+      return false;
+    }
+}
+
+function setKeyActions(elem,action)
+{
+  elem.setAttribute('onkeydown',action);
+  elem.setAttribute('onkeypress',action);
+  elem.setAttribute('onkeyup',action);
+}
+
+function setClassAttr(elem,attr)
+{
+  elem.setAttribute('class',attr);
+  elem.setAttribute('className',attr);
+}
+
+function createResults()
+{
+  var results = document.getElementById("SRResults");
+  for (var e=0; e<searchData.length; e++)
+  {
+    var id = searchData[e][0];
+    var srResult = document.createElement('div');
+    srResult.setAttribute('id','SR_'+id);
+    setClassAttr(srResult,'SRResult');
+    var srEntry = document.createElement('div');
+    setClassAttr(srEntry,'SREntry');
+    var srLink = document.createElement('a');
+    srLink.setAttribute('id','Item'+e);
+    setKeyActions(srLink,'return searchResults.Nav(event,'+e+')');
+    setClassAttr(srLink,'SRSymbol');
+    srLink.innerHTML = searchData[e][1][0];
+    srEntry.appendChild(srLink);
+    if (searchData[e][1].length==2) // single result
+    {
+      srLink.setAttribute('href',searchData[e][1][1][0]);
+      if (searchData[e][1][1][1])
+      {
+       srLink.setAttribute('target','_parent');
+      }
+      var srScope = document.createElement('span');
+      setClassAttr(srScope,'SRScope');
+      srScope.innerHTML = searchData[e][1][1][2];
+      srEntry.appendChild(srScope);
+    }
+    else // multiple results
+    {
+      srLink.setAttribute('href','javascript:searchResults.Toggle("SR_'+id+'")');
+      var srChildren = document.createElement('div');
+      setClassAttr(srChildren,'SRChildren');
+      for (var c=0; c<searchData[e][1].length-1; c++)
+      {
+        var srChild = document.createElement('a');
+        srChild.setAttribute('id','Item'+e+'_c'+c);
+        setKeyActions(srChild,'return searchResults.NavChild(event,'+e+','+c+')');
+        setClassAttr(srChild,'SRScope');
+        srChild.setAttribute('href',searchData[e][1][c+1][0]);
+        if (searchData[e][1][c+1][1])
+        {
+         srChild.setAttribute('target','_parent');
+        }
+        srChild.innerHTML = searchData[e][1][c+1][2];
+        srChildren.appendChild(srChild);
+      }
+      srEntry.appendChild(srChildren);
+    }
+    srResult.appendChild(srEntry);
+    results.appendChild(srResult);
+  }
+}
+
+function init_search()
+{
+  var results = document.getElementById("MSearchSelectWindow");
+  for (var key in indexSectionLabels)
+  {
+    var link = document.createElement('a');
+    link.setAttribute('class','SelectItem');
+    link.setAttribute('onclick','searchBox.OnSelectItem('+key+')');
+    link.href='javascript:void(0)';
+    link.innerHTML='<span class="SelectionMark">&#160;</span>'+indexSectionLabels[key];
+    results.appendChild(link);
+  }
+  searchBox.OnSelectItem(0);
+}
+
diff --git a/test-framework/docs/search/search_l.png b/test-framework/docs/search/search_l.png
new file mode 100644
index 0000000000000000000000000000000000000000..c872f4da4a01d0754f923e6c94fd8159c0621bd1
GIT binary patch
literal 604
zcmV-i0;BzjP)<h;3K|Lk000e1NJLTq000yK000vR1^@s6kc=(000009a7bBm000XU
z000XU0RWnu7ytkOAY({UO#lFGm;eBCjsO7QH~;{G)c^o`2LJ%dv;Y7zL;wIBc7!%6
zy#N3K;z>k7RCwB~R6VQOP#AvB$vH7i{6H{96zot$7cZT<7246EF5Np6N}+$IbiG6W
zg#87A+NFaX+=_^xM1#gCtshC=E{%9^uQX_%?YwXvo{#q&MnpJ8uh(O?ZRc&<Zo01f
zZnN3kY`5D4=NybN{0l51>~_1%^SsPxG<xm2?uTqPdy~uML^_>@rfE<VB|c%N(_!=Z
z{K<GczSVX8d8JYjrfDLTN<q^!2qC~2i$y2^V6|GMCzHviVzKzLTCF0V&%-bbNGZWN
zM_juAAlmIVpH8Q*Ow)W(uh(H&7Ia;QloFRfEEWrsh~Cy}HQll-7={5M1TF>lJg-?U
zm!Cz-IOn(qJP3kDp-^~qt+FGbl=5jNli^Wj_xIBG{Rc0en{!oFvyoNC7{V~T8}b>|
z=jL2WIR<cCi@57?)-n-w_WS+O>eZzX(YN(_9fV;BBD$VXQIxNa<NVz1cK9FQiA3VZ
za=HBOI1YT@KU%-vc5K2%qwy;Ug4^M6=qwfs1VI2Iy0{$vX9d1^p7(h$7>sAL8AT<X
zQ%OWP91b`w^UiMrU@3(7=y{&o@Au!AN~OoqQ&d$IQp&#+3n3nihn*f;t(E{#C!#m1
qsx}S7C?=Chp=p}JIggdW?*RZc<<(x$?F{_@0000<MNUMnLSTX?9|#Tr

literal 0
HcmV?d00001

diff --git a/test-framework/docs/search/search_m.png b/test-framework/docs/search/search_m.png
new file mode 100644
index 0000000000000000000000000000000000000000..b429a16ba641960da1e52e5da85dc80fd82635c8
GIT binary patch
literal 158
zcmeAS@N?(olHy`uVBq!ia0vp^Oh7Em0U}M~ynTTbOS+@4BLl;=8&~`zjDUQ}64!{5
z;QX|b^2DN42FH~Aq*MjZ+{E<Mpwz^a%EFVWHb6xNo-U3d6}OUf^!3vd5)y3c{#bPU
z`teb@<JbTH_7jql7?`61bOfX$^6u_pUBbY`!?2W{-=^-N>vEu822WQ%mvv4FO#qs`
BFGc_W

literal 0
HcmV?d00001

diff --git a/test-framework/docs/search/search_r.png b/test-framework/docs/search/search_r.png
new file mode 100644
index 0000000000000000000000000000000000000000..97ee8b439687084201b79c6f776a41f495c6392a
GIT binary patch
literal 612
zcmV-q0-ODbP)<h;3K|Lk000e1NJLTq000sI000vR1^@s6oswPh00009a7bBm000XU
z000XU0RWnu7ytkOAY({UO#lFGm;eBCjsO7QH~;{G)c^o`2LJ%dv;Y7zL;wIBc7!%6
zy#N3K>PbXFRCwB?)W514K@<k?Z}y+E3TvfSi=>j&X?z2*SxFI6-@HT2E2K=9X9%Pb
zEK*!TBw&g(DMC;|A)uGlRkOS9vd-?zNs%bR4d$w+ox_iFnE8fvIvv7^5<(>Te12Li
z7C)9srCzmK{ZcNM{YIl9j{DePFgOWiS%xG@5CnnnJa4nvY<^glbz7^|-ZY!dUkAwd
z{gaTC@_>b5h~;ug<MCL=as0uy?dOi;gaE*#lqVq~f|L?cN~CFuD2lLHEHE4nh3mTS
zYqi=<tJR7$#@Hzbj4>#R0wRL0>o5!hxm*s0VW?8dr}O#zXTRTnrQm_Z7z1Mrnx>&p
zD4<fQpkA+Q0A8%u>qifUjzLvbVVWi?l?rUzwt^sdb~d!f_LEhsRVIXZtQ=qSxuxqm
zEX#tf>$?M_Y1-LSDT)HqG?`%-%ZpY!#{N!rcNIiL;G7F0`l?)mNGTD9;f9F5Up3Kg
zw}a<-JylhG&;=!>B+fZaCX+?C+kHYrP%c?X2!Zu_olK|GcS4A70HEy;vn)I0>0kLH
z`jc(WIaaHc7!HS@f*^R^Znx8W=_jIl2oWJoQ*h1^$FX!>*PqR1J<j<{$8qis?{G94
y;eY>8k|fw}w_y}TpE>7m8DqDO<3z`OzXt$ccSejbEZCg@0000<MNUMnLSTZ*_y_g?

literal 0
HcmV?d00001

diff --git a/test-framework/docs/search/searchdata.js b/test-framework/docs/search/searchdata.js
new file mode 100644
index 000000000..b0d6574c9
--- /dev/null
+++ b/test-framework/docs/search/searchdata.js
@@ -0,0 +1,27 @@
+var indexSectionsWithContent =
+{
+  0: "_cdglmrt",
+  1: "cdr",
+  2: "_cdg",
+  3: "dmt",
+  4: "l"
+};
+
+var indexSectionNames =
+{
+  0: "all",
+  1: "files",
+  2: "functions",
+  3: "defines",
+  4: "pages"
+};
+
+var indexSectionLabels =
+{
+  0: "All",
+  1: "Files",
+  2: "Functions",
+  3: "Macros",
+  4: "Pages"
+};
+
diff --git a/test-framework/docs/splitbar.png b/test-framework/docs/splitbar.png
new file mode 100644
index 0000000000000000000000000000000000000000..fe895f2c58179b471a22d8320b39a4bd7312ec8e
GIT binary patch
literal 314
zcmeAS@N?(olHy`uVBq!ia0vp^Yzz!63>-{AmhX=Jf(#6djGiuzAr*{o?=JLmPLyc>
z_*`QK&+BH@jW<lVxsx`Ym~nPnqw$O~`M84{XS6<Mm0<Zit<Tk``D^RashfFq{wG<#
zZG2vRxL<$IhkFMSBd@N1`uRtp)t>rYJ7>r6%keRM@)Qyv8R=enp0jiI>aWlGyB58O
zFVR20d+y`K7vDw(hJF3;>dD*3-?v=<8M)@x|E<fHWtM%;-WUJ&>EGLnJsniYK!2U1
Y!`|5biEc?d1`HDhPgg&ebxsLQ02F6;9RL6T

literal 0
HcmV?d00001

diff --git a/test-framework/docs/sync_off.png b/test-framework/docs/sync_off.png
new file mode 100644
index 0000000000000000000000000000000000000000..3b443fc62892114406e3d399421b2a881b897acc
GIT binary patch
literal 853
zcmV-b1FHOqP)<h;3K|Lk000e1NJLTq000;O000;W1^@s6;CDUv0009VNkl<ZcmeI*
zOK4PA7{KxW<S|JmGnqI|rb(KahDirA+8B+gVk8A)%pe9yF;+3L5iKZG7xuBS&@L(k
z33MTXOIxMHjirbWgs8M;qhM?(_-v^nS(KzU#%Ih_`hB-^XYSm&39)2*I6vmhow@fr
z=iKj{vvuv-e;!~uA+biR6pf-n<cdGVuox5<#BBg4c>oT|#XixUYy%lpuf3i8{fX!o
zUyDD0jOrAiT^tq>fLSOOABs-#u{dV^F$b{L9&!2=9&RmV;;8s^x&UqB$PCj4FdKbh
zoB1WTskPUPu05XzFbA}=KZ-GP1fPpAfSs>6AHb12UlR%-i&uOlTpFNS7{jm@mkU1V
zh`nrXr~+^lsV-s1dkZOaI|kYyVj3WBpPCY{n~yd%u%e+d=f%`N0FItMPtdgBb@py;
zq@v6NVArhyTC7)ULw-Jy8y42S1~4n(3LkrW8mW(F-4oXUP3E`e#g**YyqI7h-J2zK
zK{m9##m4ri!7N>CqQqCcnI3hqo1I;Yh&QLNY4T`*ptiQGozK>FF$!$+84Z`xwmeMh
zJ0WT+OH$WYFALEaGj2_l+#DC3t7_S`vHpSivNeFbP6+r50cO<q-Bsh$IuZaopT|9E
z-75alp&U9s%(|8uI^NA(#AD;nc=%{ivdZX(QFJ7~-yf%_Adjk`W@NhjJTyZ8*;|!n
z9=K#TJuZz+={YZ#>8iu)`7i%Z4BTPh@_m3Tk!nAm^)5Bqnr%Ov|Baunj#&RPtRuK&
z4RGz|D5HNrW83-#ydk}tVKJrNmyYt-sT<tBHx6XfOFDx2(ijpMiR>xLGlJY5nc&Re
zU4SgHNPx8~Yxwr$bsju?4q&%T1874xxzq+_%?h8_ofw~(bld=o3iC)LUNR*BY%c0y
zWd_jX{Y8`l%z+ol1$@Qa?Cy!(0CVIEeYpKZ`(9{z>3$CIe;pJDQk$m3p}$>xBm4lb
zKo{4S)`wdU9Ba9jJbVJ0C=SOefZe%d$8=2r={nu<_^a3~>c#t_U6dye5)JrR(_a^E
f@}b6j1K9lwFJq@>o)+Ry00000NkvXXu0mjfWa5j*

literal 0
HcmV?d00001

diff --git a/test-framework/docs/sync_on.png b/test-framework/docs/sync_on.png
new file mode 100644
index 0000000000000000000000000000000000000000..e08320fb64e6fa33b573005ed6d8fe294e19db76
GIT binary patch
literal 845
zcmV-T1G4;yP)<h;3K|Lk000e1NJLTq000;O000;W1^@s6;CDUv0009NNkl<ZcmeI*
zUr1D09KiAKIOC-Ar)j4&EoU~y1|7@QCTmeCsMH~fFw#|0OWK8m>Y;xxyHF2B5Wzm|
zOOGupOTn@c(JmBOl)e;XMNnZuiTJP>rM8<|Q`7I<ojWskx{8*sm){4kXJ+p2oO6HY
zoL5W7@h*VL_(ZL!7GaSmtl}SWU-XD;q7T4~4ZuW>_))aP?*T)ow&n59{}X4$3Goat
zgjs?*aasfbrokzG5cT4K=uG`E14xZl@z)F<o_Z}1zllSWC8!Z+rkFN>={P0Y^?$4t
z>v!teRnNZym<6h{7sLyF1V0HsfEl+l6TrZpsfr1}luH~F7L}ktXu|*uVX^RG$L0`K
zWs3j|0tIvVe(N%_?2{(iCPFGf#B6Hjy6o&}D$A%W%jfO8_W%ZO#-mh}EM$LMn7joJ
z05dHr!5Y92g+31l<%i1(=L1a1pXX+OYnalY>31V4K}BjyRe3)9n#;-cCVRD_IG1fT
zOKGeNY8q;TL@K{dj@D^scf&VCs*-Jb>8b>|`b*osv52-!A?BpbYtTQBns5EAU**$m
zSnVSm(teh>tQi*S*A>#ySc=n;`BHz`DuG4&g4Kf8lLhca+zvZ7t7RflD6-i-mcK=M
z!=^P$*u2)bkY5asG4gsss!Hn%u~>}kIW`vMs%lJLH+u*9<4PaV_c6U`KqWXQH%+Nu
zTv41O(^ZVi@qhjQdG!fbZw&y+2o!iYymO^?ud3{P*HdoX83YV*Uu_HB=?U&W9%AU#
z80}k1SS-CXTU7dcQlsm<^oYLxVSseqY6NO}dc`Nj?8vrhNuCdm@^{a3AQ_>6myOj+
z`1RsLUXF|dm|3k7s2jD(B{rzE>WI2scH8i1;=O5Cc9xB3^aJk%fQjqsu+kH#0=_5a
z0nCE8@dbQa-|YIuUVvG0L_IwHMEhOj$M<u9&-IHqnYs=DL+lbi3lG2ysF!p!_2H=p
zj-g89hmThki^;JHknVE4V`@zS$(ZbTd?1=dsrXLRiJbUBq7weAmVjEk@rP>j4Uq05
X8=0q~qBNan00000NkvXXu0mjfptF>5

literal 0
HcmV?d00001

diff --git a/test-framework/docs/tab_a.png b/test-framework/docs/tab_a.png
new file mode 100644
index 0000000000000000000000000000000000000000..3b725c41c5a527a3a3e40097077d0e206a681247
GIT binary patch
literal 142
zcmeAS@N?(olHy`uVBq!ia0vp^j6kfy!2~3aiye;!QlXwMjv*C{Z|8b*H5dputLHD#
z=<0|*y7z(Vor?d;H&?EG&cXR}?!j-Lm&u1OOI7AIF5&c)RFE;&p0MYK>*Kl@eiymD
r@|NpwKX@^z+;{u_Z~trSBfrMKa%3`zocFjEXaR$#tDnm{r-UW|TZ1%4

literal 0
HcmV?d00001

diff --git a/test-framework/docs/tab_b.png b/test-framework/docs/tab_b.png
new file mode 100644
index 0000000000000000000000000000000000000000..e2b4a8638cb3496a016eaed9e16ffc12846dea18
GIT binary patch
literal 169
zcmeAS@N?(olHy`uVBq!ia0vp^j6kfy!2~3aiye;!QU#tajv*C{Z}0l@H7kg?K0Lnr
z!j&C6_(~HV9oQ0Pa6x{-v0AGV_E?vLn<f<Rf3mJ=+uzfrOMlc%s`x4TZtnrR|B~W{
zyZP0m7vvtXV80W5^J2vvp97)4WrPK1-P<H^B$Ll|TGvzm;+92|BpdT89$b1Qf7x5g
UZ&RH}7SL`6Pgg&ebxsLQ0A}n&iU0rr

literal 0
HcmV?d00001

diff --git a/test-framework/docs/tab_h.png b/test-framework/docs/tab_h.png
new file mode 100644
index 0000000000000000000000000000000000000000..fd5cb705488e60fcf30f56fcc951dee74f3b095b
GIT binary patch
literal 177
zcmeAS@N?(olHy`uVBq!ia0vp^j6kfy!2~3aiye;!QWc&qjv*C{Z}0jF9dr<AdpNI7
zaOs_6=O($9b?lc?Qk=SJVv5%FA{O^TY1^*qJ@<p}E}!uH_1eoPJ&tpVl={bg{Skd2
zp1FO|;|R90%G3WYZM5AU=A4%H?3qaQhHt%H9G|xYJ)ff*|MmI*zD3`*Z|LP?7d&26
cn!ZiLK0QM$CeyB_80ZEDPgg&ebxsLQ0C?O;!~g&Q

literal 0
HcmV?d00001

diff --git a/test-framework/docs/tab_s.png b/test-framework/docs/tab_s.png
new file mode 100644
index 0000000000000000000000000000000000000000..ab478c95b67371d700a20869f7de1ddd73522d50
GIT binary patch
literal 184
zcmeAS@N?(olHy`uVBq!ia0vp^j6kfy!2~3aiye;!QuUrLjv*C{Z|^p8HaRdjTwH7)
zC?wLlL}}I{)n%R&r+1}IGmDnq;&J#%V6)9VsYhS`O^BVBQlxOUep0c$RENLq#g8A$
z)z7%K_bI&n@J+X_=x}fJoEKed-$<>=ZI-;YrdjIl`U`uzuDWSP?o#Dmo{%SgM#oan
kX~E1%D-|#H#QbHoIja2U-MgvsK&LQxy85}Sb4q9e0Efg%P5=M^

literal 0
HcmV?d00001

diff --git a/test-framework/docs/tabs.css b/test-framework/docs/tabs.css
new file mode 100644
index 000000000..9cf578f23
--- /dev/null
+++ b/test-framework/docs/tabs.css
@@ -0,0 +1,60 @@
+.tabs, .tabs2, .tabs3 {
+    background-image: url('tab_b.png');
+    width: 100%;
+    z-index: 101;
+    font-size: 13px;
+    font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
+}
+
+.tabs2 {
+    font-size: 10px;
+}
+.tabs3 {
+    font-size: 9px;
+}
+
+.tablist {
+    margin: 0;
+    padding: 0;
+    display: table;
+}
+
+.tablist li {
+    float: left;
+    display: table-cell;
+    background-image: url('tab_b.png');
+    line-height: 36px;
+    list-style: none;
+}
+
+.tablist a {
+    display: block;
+    padding: 0 20px;
+    font-weight: bold;
+    background-image:url('tab_s.png');
+    background-repeat:no-repeat;
+    background-position:right;
+    color: #283A5D;
+    text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
+    text-decoration: none;
+    outline: none;
+}
+
+.tabs3 .tablist a {
+    padding: 0 10px;
+}
+
+.tablist a:hover {
+    background-image: url('tab_h.png');
+    background-repeat:repeat-x;
+    color: #fff;
+    text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
+    text-decoration: none;
+}
+
+.tablist li.current a {
+    background-image: url('tab_a.png');
+    background-repeat:repeat-x;
+    color: #fff;
+    text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
+}
-- 
GitLab


From cfe11fb5b4ac74ffb0664f5598508d0eb4619813 Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Thu, 26 Oct 2023 12:29:44 +0700
Subject: [PATCH 02/21] [*] The separate assembly of dap-sdk along with tests
 has been fixed.

---
 CMakeLists.txt                    | 23 +++++++++++++++--------
 core/CMakeLists.txt               |  2 ++
 core/test/dap_strfuncs_test.c     |  2 +-
 crypto/CMakeLists.txt             |  1 +
 crypto/test/crypto/CMakeLists.txt |  2 +-
 examples/CMakeLists.txt           |  3 +--
 examples/rng_example.c            |  2 +-
 7 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7673cbe18..31c775a18 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,3 +1,5 @@
+cmake_minimum_required(VERSION 3.10)
+project(DAP_SDK_NATIVE C)
 set(DAP_SDK_NATIVE_VERSION "2.2-2")
 
 include(ExternalProject)
@@ -38,11 +40,15 @@ endif()
 message("json-c build cmd ${JSON-C-CONFIG_COMMAND}")
 
 ExternalProject_Add(dap_json-c_dep
-                    SOURCE_DIR ${PROJECT_SOURCE_DIR}/dap-sdk/3rdparty/json-c/
+                    SOURCE_DIR ${PROJECT_SOURCE_DIR}/3rdparty/json-c/
                     CONFIGURE_COMMAND ${JSON-C-CONFIG_COMMAND})
 
+include(cmake/OS_Detection.cmake)
 if (CELLFRAME_MODULES MATCHES "core")
     SET(DAPSDK_MODULES "${DAPSDK_MODULES} core crypto io")
+    if (BUILD_DAP_TESTS)
+        SET(BUILD_CRYPTO_TESTS ON)
+    endif()
 endif()
 
 if (CELLFRAME_MODULES MATCHES "chains")
@@ -69,6 +75,14 @@ else()
 endif()
 
 # Core, add it always
+if (BUILD_DAP_SDK_TESTS)
+    enable_testing()
+    add_subdirectory(test-framework)
+    set(BUILD_DAP_TESTS ON)
+    set(BUILD_CRYPTO_TESTS ON)
+#    set(DAPSDK_MODULES "crypto")
+    message("[+] Enable dap_sdk_tests")
+endif ()
 add_subdirectory(core)
 if (DAPSDK_MODULES MATCHES "crypto")
     # Cryptography
@@ -120,11 +134,4 @@ elseif(ANDROID)
     include_directories(3rdparty/)
 endif()
 
-#if(BUILD_DAP_TESTS)
-#    file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test/main_test.py
-#            DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
-#    enable_testing()
-#    add_subdirectory(test)
-#endif()
-
 add_subdirectory(examples)
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index f020eb5e2..0d7684305 100755
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -63,6 +63,8 @@ endif()
 target_link_libraries(${PROJECT_NAME} ${CORE_LIBRARIES})
 
 if(BUILD_DAP_TESTS)
+    message("Enabled dap_core test")
     enable_testing()
+    add_definitions("-DDAP_NETWORK_MONITOR_TEST_OFF")
     add_subdirectory(test)
 endif()
diff --git a/core/test/dap_strfuncs_test.c b/core/test/dap_strfuncs_test.c
index 010da4e0b..85ea7f93a 100755
--- a/core/test/dap_strfuncs_test.c
+++ b/core/test/dap_strfuncs_test.c
@@ -91,7 +91,7 @@ void dap_list_test(void)
     l_list = dap_list_append(l_list, "item 3");
     l_list = dap_list_prepend(l_list, "item 0");
 
-    dap_list_t *l_list_tmp = dap_list_find(l_list, "item 2");
+    dap_list_t *l_list_tmp = dap_list_find(l_list, "item 2", NULL);
     unsigned int l_count = dap_list_length(l_list);
     dap_list_remove(l_list, "item 3");
     unsigned int l_count_after = dap_list_length(l_list);
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt
index d3fccaebc..9ac2c7225 100755
--- a/crypto/CMakeLists.txt
+++ b/crypto/CMakeLists.txt
@@ -330,5 +330,6 @@ target_include_directories(dap_crypto PUBLIC ../3rdparty/shishua)
 
 if(BUILD_CRYPTO_TESTS)
     enable_testing()
+    message("[*] Enable crypto test")
     add_subdirectory(test)
 endif()
diff --git a/crypto/test/crypto/CMakeLists.txt b/crypto/test/crypto/CMakeLists.txt
index 8620c56c4..8fd610139 100755
--- a/crypto/test/crypto/CMakeLists.txt
+++ b/crypto/test/crypto/CMakeLists.txt
@@ -4,7 +4,7 @@ project(crypto-test)
 # init CellFrame SDK
 add_definitions("-DDAP_VERSION=\"${CPACK_PACKAGE_VERSION_MAJOR}-${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}\"")
 set(SUBMODULES_NO_BUILD ON)
-include (../../../../cmake/OS_Detection.cmake)
+#include (../../../../cmake/OS_Detection.cmake)
 set(DAPSDK_MODULES "core crypto network-core network-client network-server")
 
 # There is no need, as it was added in cellframe-sdk/CMakeLists.txt
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index e34520c98..7daf1f2f1 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -15,5 +15,4 @@ add_executable(rng_example rng_example.c)
 #        )
 
 target_link_libraries( rng_example
-        cellframe-sdk
-)
+        dap_core dap_crypto)
diff --git a/examples/rng_example.c b/examples/rng_example.c
index 3574fc3a2..182744d87 100644
--- a/examples/rng_example.c
+++ b/examples/rng_example.c
@@ -1,7 +1,7 @@
 #include <stdio.h>
 #include "../crypto/src/rand/dap_rand.h"
 #include "dap_math_ops.h"
-#include "dap_chain_common.h"
+//#include "dap_chain_common.h"
 
 #define NUMBER_OF_BITSTREAMS 100
 #define NUMBER_OF_ELEMENTS 1024 * 4
-- 
GitLab


From 652a9d97a54d2f794a868de58998d0c409480c40 Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Thu, 26 Oct 2023 20:28:52 +0700
Subject: [PATCH 03/21] [*] Fixed compile tests.

---
 crypto/test/crypto/dap_enc_test.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/crypto/test/crypto/dap_enc_test.c b/crypto/test/crypto/dap_enc_test.c
index 16ad86be8..a4ec14e4d 100755
--- a/crypto/test/crypto/dap_enc_test.c
+++ b/crypto/test/crypto/dap_enc_test.c
@@ -271,13 +271,14 @@ static void test_serealize_deserealize(dap_enc_key_type_t key_type)
 
 //  for key_type==DAP_ENC_KEY_TYPE_OAES must be: key_size=[16|24|32] and kex_size>=key_size
     dap_enc_key_t* key = dap_enc_key_new_generate(key_type, kex_data, kex_size, seed, seed_size, 32);
-    dap_enc_key_serealize_t* serealize_key = dap_enc_key_serealize(key);
-    _write_key_in_file(serealize_key, sizeof (dap_enc_key_serealize_t), TEST_SER_FILE_NAME);
-    dap_enc_key_serealize_t* deserealize_key = _read_key_from_file(TEST_SER_FILE_NAME, sizeof(dap_enc_key_serealize_t));
-    dap_assert(memcmp(serealize_key, deserealize_key, sizeof(dap_enc_key_serealize_t)) == 0,
+    dap_enc_key_serialize_t* serealize_key = dap_enc_key_serialize(key);
+    _write_key_in_file(serealize_key, sizeof (dap_enc_key_serialize_t), TEST_SER_FILE_NAME);
+    dap_enc_key_serialize_t* deserealize_key = _read_key_from_file(TEST_SER_FILE_NAME, sizeof(dap_enc_key_serialize_t));
+    dap_assert(memcmp(serealize_key, deserealize_key, sizeof(dap_enc_key_serialize_t)) == 0,
                "dap_enc_key_serealize_t equals");
 
-    dap_enc_key_t* key2 = dap_enc_key_deserealize(deserealize_key, sizeof (*deserealize_key));
+    dap_enc_key_t* key2 = dap_enc_key_deserialize(deserealize_key, sizeof (*deserealize_key));
+    dap_assert(key2, "Error: Unable to deserialize the public key");
 
     dap_assert(key->type == key2->type, "Key type");
     dap_assert(key->last_used_timestamp == key2->last_used_timestamp,
@@ -348,20 +349,20 @@ static void test_serealize_deserealize_pub_priv(dap_enc_key_type_t key_type)
     // Serialize key & save/read to/from buf
     size_t l_data_pub_size = 0;
     //uint8_t *l_data_pub = DAP_NEW_SIZE(uint8_t, l_data_pub_size);//dap_enc_key_serealize_pub_key(key, &l_data_pub_size);
-    uint8_t *l_data_pub = dap_enc_key_serealize_pub_key(key, &l_data_pub_size);
+    uint8_t *l_data_pub = dap_enc_key_serialize_pub_key(key, &l_data_pub_size);
     _write_key_in_file(l_data_pub, l_data_pub_size, TEST_SER_FILE_NAME);
     uint8_t *l_data_pub_read = _read_key_from_file(TEST_SER_FILE_NAME, l_data_pub_size);
 
     size_t l_data_priv_size = 0;
-    uint8_t *l_data_priv = dap_enc_key_serealize_priv_key(key, &l_data_priv_size);
+    uint8_t *l_data_priv = dap_enc_key_serialize_priv_key(key, &l_data_priv_size);
     _write_key_in_file(l_data_priv, l_data_priv_size, TEST_SER_FILE_NAME);
     uint8_t *l_data_priv_read = _read_key_from_file(TEST_SER_FILE_NAME, l_data_priv_size);
 
     // create new key2
     dap_enc_key_t *key2 = dap_enc_key_new(key_type);
     // Deserialize key2
-    dap_enc_key_deserealize_pub_key(key2, l_data_pub_read, l_data_pub_size);
-    dap_enc_key_deserealize_priv_key(key2, l_data_priv_read, l_data_priv_size);
+    dap_enc_key_deserialize_pub_key(key2, l_data_pub_read, l_data_pub_size);
+    dap_enc_key_deserialize_priv_key(key2, l_data_priv_read, l_data_priv_size);
 
     DAP_DELETE(l_data_pub);
     DAP_DELETE(l_data_pub_read);
@@ -414,9 +415,9 @@ static void test_serealize_deserealize_pub_priv(dap_enc_key_type_t key_type)
 
     // serealize & deserealize signature
     size_t sig_buf_len = sig_buf_size;
-    uint8_t *l_sign_tmp = dap_enc_key_serealize_sign(key_type, sig_buf, &sig_buf_len);
+    uint8_t *l_sign_tmp = dap_enc_key_serialize_sign(key_type, sig_buf, &sig_buf_len);
     dap_enc_key_signature_delete(key_type, sig_buf);
-    sig_buf = dap_enc_key_deserealize_sign(key_type, l_sign_tmp, &sig_buf_len);
+    sig_buf = dap_enc_key_deserialize_sign(key_type, l_sign_tmp, &sig_buf_len);
     DAP_DELETE(l_sign_tmp);
 
     dap_assert_PIF(sig_buf, "Check serealize->deserealize signature");
@@ -464,7 +465,6 @@ void dap_enc_tests_run() {
     test_serealize_deserealize(DAP_ENC_KEY_TYPE_IAES);
     dap_print_module_name("dap_enc serealize->deserealize OAES");
     test_serealize_deserealize(DAP_ENC_KEY_TYPE_OAES);
-
     dap_print_module_name("dap_enc_sig serealize->deserealize BLISS");
     test_serealize_deserealize_pub_priv(DAP_ENC_KEY_TYPE_SIG_BLISS);
     dap_print_module_name("dap_enc_sig serealize->deserealize PICNIC");
-- 
GitLab


From 333c7ec3f8a8edb4c557784edb16c065c57d3ab8 Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Thu, 26 Oct 2023 20:35:21 +0700
Subject: [PATCH 04/21] [*] Enabled tests for cryptography.

---
 CMakeLists.txt                    | 2 +-
 crypto/test/crypto/CMakeLists.txt | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 31c775a18..6a09d2b9c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -80,7 +80,7 @@ if (BUILD_DAP_SDK_TESTS)
     add_subdirectory(test-framework)
     set(BUILD_DAP_TESTS ON)
     set(BUILD_CRYPTO_TESTS ON)
-#    set(DAPSDK_MODULES "crypto")
+    set(DAPSDK_MODULES "crypto")
     message("[+] Enable dap_sdk_tests")
 endif ()
 add_subdirectory(core)
diff --git a/crypto/test/crypto/CMakeLists.txt b/crypto/test/crypto/CMakeLists.txt
index 8fd610139..f0a05ee5e 100755
--- a/crypto/test/crypto/CMakeLists.txt
+++ b/crypto/test/crypto/CMakeLists.txt
@@ -39,6 +39,9 @@ add_executable(${PROJECT_NAME} ${SRC})
 
 target_link_libraries(${PROJECT_NAME} dap_test dap_core dap_crypto m)
 
+# Disabled tests
+add_definitions("-DDAP_CRYPTO_NEWHOPE_TEST_OFF")
+add_definitions("-DDAP_CRYPTO_MULTISIGN_TEST_OFF")
 add_test(
     NAME crypto-test
     COMMAND crypto-test
-- 
GitLab


From ec08bc1ece24a4de06eefde49d86658080c3b726 Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Thu, 26 Oct 2023 20:37:23 +0700
Subject: [PATCH 05/21] [+] Added a check that the size of the public and/or
 private key is 0, then memory is not allocated, because for example we have
 an OAES key and neither the field with the public nor the private key is
 filled in. And because of this, tests are lying around.

---
 crypto/src/dap_enc_key.c | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/crypto/src/dap_enc_key.c b/crypto/src/dap_enc_key.c
index da4bd6a42..80fe39ab4 100755
--- a/crypto/src/dap_enc_key.c
+++ b/crypto/src/dap_enc_key.c
@@ -796,21 +796,25 @@ dap_enc_key_t* dap_enc_key_deserialize(const void *buf, size_t a_buf_size)
     l_ret->_inheritor_size = in_key->inheritor_size;
     DAP_DEL_Z(l_ret->priv_key_data);
     DAP_DEL_Z(l_ret->pub_key_data);
-    l_ret->priv_key_data = DAP_NEW_Z_SIZE(byte_t, l_ret->priv_key_data_size);
-    if (!l_ret->priv_key_data) {
-        log_it(L_CRITICAL, "Memory allocation error");
-        DAP_DEL_Z(l_ret);
-        return NULL;
+    if (l_ret->priv_key_data_size) {
+        l_ret->priv_key_data = DAP_NEW_Z_SIZE(byte_t, l_ret->priv_key_data_size);
+        if (!l_ret->priv_key_data) {
+            log_it(L_CRITICAL, "Memory allocation error");
+            DAP_DEL_Z(l_ret);
+            return NULL;
+        }
+        memcpy(l_ret->priv_key_data, in_key->priv_key_data, l_ret->priv_key_data_size);
     }
-    memcpy(l_ret->priv_key_data, in_key->priv_key_data, l_ret->priv_key_data_size);
-    l_ret->pub_key_data = DAP_NEW_Z_SIZE(byte_t, l_ret->pub_key_data_size);
-    if (!l_ret->pub_key_data) {
-        log_it(L_CRITICAL, "Memory allocation error");
-        DAP_DEL_Z(l_ret->priv_key_data);
-        DAP_DEL_Z(l_ret);
-        return NULL;
+    if (l_ret->pub_key_data_size) {
+        l_ret->pub_key_data = DAP_NEW_Z_SIZE(byte_t, l_ret->pub_key_data_size);
+        if (!l_ret->pub_key_data) {
+            log_it(L_CRITICAL, "Memory allocation error");
+            DAP_DEL_Z(l_ret->priv_key_data);
+            DAP_DEL_Z(l_ret);
+            return NULL;
+        }
+        memcpy(l_ret->pub_key_data, in_key->pub_key_data, l_ret->pub_key_data_size);
     }
-    memcpy(l_ret->pub_key_data, in_key->pub_key_data, l_ret->pub_key_data_size);
     if(in_key->inheritor_size) {
         DAP_DEL_Z(l_ret->_inheritor);
         l_ret->_inheritor = DAP_NEW_Z_SIZE(byte_t, in_key->inheritor_size );
-- 
GitLab


From 17a35a9ab8749634e7dc33abfba6c775aab83bf4 Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Fri, 27 Oct 2023 15:05:30 +0700
Subject: [PATCH 06/21] [*] The global_db test has been transferred from
 cellframe-sdk

---
 global-db/test/CMakeLists.txt       |  11 ++
 global-db/test/dap_global_db_test.c | 233 ++++++++++++++++++++++++++++
 2 files changed, 244 insertions(+)
 create mode 100644 global-db/test/CMakeLists.txt
 create mode 100644 global-db/test/dap_global_db_test.c

diff --git a/global-db/test/CMakeLists.txt b/global-db/test/CMakeLists.txt
new file mode 100644
index 000000000..b2a09e950
--- /dev/null
+++ b/global-db/test/CMakeLists.txt
@@ -0,0 +1,11 @@
+cmake_minimum_required(VERSION 3.4.1)
+
+project(global_db_test)
+
+add_executable(${PROJECT_NAME} dap_global_db_test.c)
+
+target_link_libraries(${PROJECT_NAME} dap_core dap_test dap_global_db)
+add_test(
+		NAME global_db_test
+		COMMAND global_db_test
+)
diff --git a/global-db/test/dap_global_db_test.c b/global-db/test/dap_global_db_test.c
new file mode 100644
index 000000000..eb6fe766d
--- /dev/null
+++ b/global-db/test/dap_global_db_test.c
@@ -0,0 +1,233 @@
+#include <time.h>
+#include <unistd.h>
+#include <stdatomic.h>
+
+#include "dap_common.h"
+#include "dap_strfuncs.h"
+#include "dap_file_utils.h"
+#include "dap_events.h"
+#include "dap_proc_thread.h"
+#include "dap_proc_queue.h"
+#include "dap_hash.h"
+
+#include "dap_global_db.h"
+#include "dap_global_db_driver.h"
+
+#define LOG_TAG "dap_globaldb_test"
+
+#define DB_FILE "./base.tmp"
+
+
+
+static int s_test_create_db(const char *db_type, int mode)
+{
+int rc;
+char    l_cmd[MAX_PATH];
+
+    if( dap_dir_test(DB_FILE) ) {
+        rmdir(DB_FILE);
+        dap_snprintf(l_cmd, sizeof(l_cmd), "rm -rf %s", DB_FILE);
+        if ( (rc = system(l_cmd)) )
+             log_it(L_ERROR, "system(%s)->%d", l_cmd, rc);
+    }
+    else
+        unlink(DB_FILE);
+
+    if ( rc = dap_db_driver_init(db_type, DB_FILE, mode) )
+        return  log_it(L_ERROR, "DB driver initialization, dap_db_driver_init(%s, %s)->%d", db_type, DB_FILE, rc), rc;
+
+
+    return  log_it(L_NOTICE, "%s DB driver has been initialized in %s mode on the %s", db_type, mode ? "Async" : "Sync", DB_FILE),
+            rc;
+}
+
+typedef struct __dap_test_record__ {
+    dap_chain_hash_fast_t   csum;                                           /* CRC32 , cover <len> and <data> fields */
+    unsigned    len;                                                        /* Length of the <data> field */
+    char        data[];                                                     /* Place holder for data area */
+} dap_db_test_record_t;
+
+#define DAP_DB$SZ_DATA  8192
+#define DAP_DB$SZ_KEY   64
+#define DAP_DB$T_GROUP  "Group.Zero"
+
+
+static  void    s_test_cb_end   (void *__unused_arg__, const void *arg)
+{
+int     *l_is_completed = (int *) arg;
+
+    log_it(L_NOTICE, "Callback is called with arg: %p", arg);
+    atomic_fetch_add(l_is_completed, 1);
+}
+
+static int s_test_write(int a_count, int a_mode)
+{
+dap_store_obj_t l_store_obj = {0};
+int     l_value_len = 0, *l_pvalue, i, ret, l_key_nr;
+atomic_int  l_is_completed = 0;
+char    l_key[64] = {0}, l_value[sizeof(dap_db_test_record_t) + DAP_DB$SZ_DATA] = {0};
+dap_db_test_record_t    *prec;
+struct  timespec    now;
+
+    log_it(L_NOTICE, "Start writing %d records ...", a_count);
+
+                                                                            /* Fill static part of the <store_object> descriptor  */
+    l_store_obj.type = DAP_DB$K_OPTYPE_ADD;                                 /* Do INSERT */
+
+
+    l_store_obj.group = DAP_DB$T_GROUP;                                     /* "Table" name */
+    l_store_obj.key = l_key;                                                /* Point <.key> to the buffer with the key of record */
+    l_store_obj.value = (int8_t *) l_value;                                 /* Point <.value> to static buffer area */
+    prec = (dap_db_test_record_t *) l_value;
+
+    for (l_key_nr = 0; l_key_nr < a_count; l_key_nr++ )
+        {
+
+        if ( a_mode && (l_key_nr ==  (a_count - 1)) )                       /* Async mode ? Last request ?*/
+        {
+            l_store_obj.
+//            l_store_obj.cb = s_test_cb_end;                                 /* Callback on request complete should be called */
+            l_store_obj.cb_arg = &l_is_completed;
+        }
+
+
+        snprintf(l_key, sizeof(l_key) - 1, "KEY$%08x", l_key_nr);           /* Generate a key of record */
+
+        clock_gettime(CLOCK_REALTIME, &now);                                /* Get and save record's timestamp */
+        l_store_obj.timestamp = (now.tv_sec << 32) | ((uint32_t) (now.tv_nsec));
+
+
+        prec->len = rand() % DAP_DB$SZ_DATA;                                /* Variable payload length */
+        l_pvalue   = (int *) prec->data;
+
+        for (int  i = prec->len / sizeof(int); i--; l_pvalue++)             /* Fill record's payload with random data */
+            *l_pvalue = rand();
+
+        sprintf(prec->data, "DATA$%08x", l_key_nr);                         /* Just for fun ... */
+        l_value_len = prec->len + sizeof(dap_db_test_record_t);
+
+        l_store_obj.value_len = l_value_len;
+        assert(l_store_obj.value_len < sizeof(l_value));
+
+
+        dap_hash_fast (prec->data, prec->len, &prec->csum);                 /* Compute a hash of the payload part of the record */
+
+
+        log_it(L_DEBUG, "Store object: [%s, %s, %d octets]", l_store_obj.group, l_store_obj.key, l_store_obj.value_len);
+                                                                            /* Write has been prepared record in to the DB */
+        if ( ret = dap_chain_global_db_driver_add(&l_store_obj, 1) )
+            return  log_it(L_ERROR, "Write record to DB, code: %d", ret), ret;
+    }
+
+    if ( a_mode )
+    {
+        for ( struct timespec tmo = {0, 300*1024};  !atomic_load(&l_is_completed); tmo.tv_nsec = 300*1024)
+        {
+            log_it(L_NOTICE, "Let's finished DB request ...");
+            nanosleep(&tmo, &tmo);
+        }
+    }
+
+
+    return  0;
+}
+
+static int s_test_read(int a_count)
+{
+dap_store_obj_t *l_store_obj;
+int     l_key_nr;
+char    l_key[64], l_buf[512];
+dap_chain_hash_fast_t csum;
+dap_db_test_record_t    *prec;
+
+    log_it(L_NOTICE, "Start reading %d records ...", a_count);
+
+    for (l_key_nr = 0; l_key_nr < a_count; l_key_nr++ )
+        {
+        snprintf(l_key, sizeof(l_key) - 1, "KEY$%08x", l_key_nr);           /* Generate a key of record */
+
+        if ( !(l_store_obj = dap_chain_global_db_driver_read(DAP_DB$T_GROUP, l_key, NULL)) )
+             return  log_it(L_ERROR, "Record-Not-Found for key: %s", l_key), -ENOENT;
+
+        prec = (dap_db_test_record_t *) l_store_obj->value;
+
+        log_it(L_DEBUG, "Retrieved object: [%s, %s, %d octets]", l_store_obj->group, l_store_obj->key, l_store_obj->value_len);
+
+        log_it(L_DEBUG, "Record: ['%.*s', %d octets]", prec->len, prec->data, prec->len);
+
+
+        dap_hash_fast (prec->data, prec->len, &csum);                       /* Compute a hash of the payload part of the record */
+
+#if 0
+        dap_bin2hex (l_buf, prec->csum, sizeof(csum) );
+        log_it(L_DEBUG, "%.*s", 2*DAP_HASH_FAST_SIZE, l_buf);
+        dap_bin2hex (l_buf, csum, sizeof(csum) );
+        log_it(L_DEBUG, "%.*s", 2*DAP_HASH_FAST_SIZE, l_buf);
+#endif
+
+        if ( memcmp(&csum, &prec->csum,sizeof(dap_chain_hash_fast_t)) )     /* Integriry checking ... */
+             return  log_it(L_ERROR, "Record with key: %s, check sum error", l_key), -EINVAL;
+        }
+
+    return  0;
+}
+
+
+static void s_test_close_db(void)
+{
+    dap_db_driver_deinit();
+    log_it(L_NOTICE, "Close global_db");
+}
+
+
+int    main (int argc, char **argv)
+{
+dap_events_t *l_events;
+
+    dap_set_appname("dap_global_db_test");                                  /* Facility prefix for loggin purpose */
+
+    if ( dap_common_init("db_test", "./dbtest.log", "./" ) )                /* Log to console only ! */
+        {
+        fprintf(stderr, "dap_common_init() failed, errno=%d", errno);
+        return -2;
+        }
+
+    // log_it( L_ATT, l_debug_mode ? "*** DEBUG MODE ***" : "*** NORMAL MODE ***" );
+    dap_log_level_set( L_NOTICE );
+
+    /* New event loop init */
+    dap_events_init( 0, 0 );
+
+    if ( !(l_events = dap_events_new()) )
+        return	log_it( L_ERROR, "dap_events_new() failed" ),  -4;
+
+    dap_events_start( l_events );
+
+    /* CuttDB */
+    log_it(L_NOTICE, "Start CuttDB R/W test in Sync mode ...");
+    s_test_create_db("cdb", 0);
+    s_test_write(1350, 0);
+    s_test_read(1350);
+    s_test_close_db();
+
+
+    log_it(L_NOTICE, "Start CuttDB R/W test in Async mode ...");
+    s_test_create_db("cdb", 1);
+    s_test_write(1350, 1);
+    s_test_read(1350);
+    s_test_close_db();
+
+    /* SQLite3 */
+    log_it(L_NOTICE, "Start SQLITE3 R/W test in Sync mode ...");
+    s_test_create_db("sqlite", 0);
+    s_test_write(1350, 0);
+    s_test_read(1350);
+
+
+    log_it(L_NOTICE, "Start SQLITE3 R/W test in Async mode ...");
+    s_test_create_db("sqlite", 1);
+    s_test_write(1350, 1);
+    s_test_read(1350);
+
+    s_test_close_db();
+}
-- 
GitLab


From ca94b0140eebff0c51c8ae55039ce455fa225329 Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Fri, 27 Oct 2023 21:31:23 +0700
Subject: [PATCH 07/21] [*] The global_db test has been redesigned and now it
 only tests the mdbx database.

---
 CMakeLists.txt                      |   5 +-
 global-db/CMakeLists.txt            |   3 +
 global-db/test/dap_global_db_test.c | 167 ++++++++++------------------
 3 files changed, 68 insertions(+), 107 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6a09d2b9c..f89914a68 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -80,7 +80,10 @@ if (BUILD_DAP_SDK_TESTS)
     add_subdirectory(test-framework)
     set(BUILD_DAP_TESTS ON)
     set(BUILD_CRYPTO_TESTS ON)
-    set(DAPSDK_MODULES "crypto")
+    set(BUILD_WITH_GDB_DRIVER_MDBX ON)
+    set(DAPSDK_MODULES "crypto io network-core network-server network-client global-db")
+#    add_definitions("-DDAP_CHAIN_GDB_ENGINE_MDBX")
+#    set(DAPSDK_MODULES ${DAPSDK_MODULES} global-db)
     message("[+] Enable dap_sdk_tests")
 endif ()
 add_subdirectory(core)
diff --git a/global-db/CMakeLists.txt b/global-db/CMakeLists.txt
index 51ce90d45..1c330f513 100644
--- a/global-db/CMakeLists.txt
+++ b/global-db/CMakeLists.txt
@@ -48,3 +48,6 @@ target_include_directories(${PROJECT_NAME} INTERFACE .)
 target_include_directories(${PROJECT_NAME} PUBLIC include)
 target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/uthash/src)
 
+if (BUILD_GLOBAL_DB_TEST)
+    add_subdirectory(test)
+endif()
diff --git a/global-db/test/dap_global_db_test.c b/global-db/test/dap_global_db_test.c
index eb6fe766d..5bd3a2186 100644
--- a/global-db/test/dap_global_db_test.c
+++ b/global-db/test/dap_global_db_test.c
@@ -12,17 +12,22 @@
 
 #include "dap_global_db.h"
 #include "dap_global_db_driver.h"
+#include "dap_test.h"
 
 #define LOG_TAG "dap_globaldb_test"
 
 #define DB_FILE "./base.tmp"
 
+typedef enum s_test_mode_work{
+    SYNC,
+    ASYNC
+}s_test_mode_work_t;
 
-
-static int s_test_create_db(const char *db_type, int mode)
+static int s_test_create_db(const char *db_type)
 {
-int rc;
-char    l_cmd[MAX_PATH];
+    int rc;
+    char l_cmd[MAX_PATH];
+    dap_test_msg("Initializatiion test db %s driver in %s file", db_type, DB_FILE);
 
     if( dap_dir_test(DB_FILE) ) {
         rmdir(DB_FILE);
@@ -33,12 +38,9 @@ char    l_cmd[MAX_PATH];
     else
         unlink(DB_FILE);
 
-    if ( rc = dap_db_driver_init(db_type, DB_FILE, mode) )
-        return  log_it(L_ERROR, "DB driver initialization, dap_db_driver_init(%s, %s)->%d", db_type, DB_FILE, rc), rc;
-
-
-    return  log_it(L_NOTICE, "%s DB driver has been initialized in %s mode on the %s", db_type, mode ? "Async" : "Sync", DB_FILE),
-            rc;
+    rc = dap_db_driver_init(db_type, DB_FILE, -1);
+    dap_assert(rc == 0, "Initialization db driver");
+    return rc;
 }
 
 typedef struct __dap_test_record__ {
@@ -60,16 +62,16 @@ int     *l_is_completed = (int *) arg;
     atomic_fetch_add(l_is_completed, 1);
 }
 
-static int s_test_write(int a_count, int a_mode)
+static int s_test_write(int a_count, s_test_mode_work_t a_mode)
 {
-dap_store_obj_t l_store_obj = {0};
-int     l_value_len = 0, *l_pvalue, i, ret, l_key_nr;
-atomic_int  l_is_completed = 0;
-char    l_key[64] = {0}, l_value[sizeof(dap_db_test_record_t) + DAP_DB$SZ_DATA] = {0};
-dap_db_test_record_t    *prec;
-struct  timespec    now;
+    dap_store_obj_t l_store_obj = {0};
+    int l_value_len = 0, *l_pvalue, i, ret, l_key_nr;
+    atomic_int l_is_completed = 0;
+    char l_key[64] = {0}, l_value[sizeof(dap_db_test_record_t) + DAP_DB$SZ_DATA] = {0};
+    dap_db_test_record_t *prec;
+    struct timespec now;
 
-    log_it(L_NOTICE, "Start writing %d records ...", a_count);
+    dap_test_msg("Start writing %d records ...", a_count);
 
                                                                             /* Fill static part of the <store_object> descriptor  */
     l_store_obj.type = DAP_DB$K_OPTYPE_ADD;                                 /* Do INSERT */
@@ -77,18 +79,18 @@ struct  timespec    now;
 
     l_store_obj.group = DAP_DB$T_GROUP;                                     /* "Table" name */
     l_store_obj.key = l_key;                                                /* Point <.key> to the buffer with the key of record */
-    l_store_obj.value = (int8_t *) l_value;                                 /* Point <.value> to static buffer area */
+    l_store_obj.value = (uint8_t *) l_value;                                 /* Point <.value> to static buffer area */
     prec = (dap_db_test_record_t *) l_value;
 
     for (l_key_nr = 0; l_key_nr < a_count; l_key_nr++ )
-        {
-
-        if ( a_mode && (l_key_nr ==  (a_count - 1)) )                       /* Async mode ? Last request ?*/
-        {
-            l_store_obj.
+    {
+        dap_test_msg("Write %d record in GDB", l_key_nr);
+//        if ( a_mode && (l_key_nr ==  (a_count - 1)) )                       /* Async mode ? Last request ?*/
+//        {
+//            l_store_obj.
 //            l_store_obj.cb = s_test_cb_end;                                 /* Callback on request complete should be called */
-            l_store_obj.cb_arg = &l_is_completed;
-        }
+//            l_store_obj.cb_arg = &l_is_completed;
+//        }
 
 
         snprintf(l_key, sizeof(l_key) - 1, "KEY$%08x", l_key_nr);           /* Generate a key of record */
@@ -113,50 +115,44 @@ struct  timespec    now;
         dap_hash_fast (prec->data, prec->len, &prec->csum);                 /* Compute a hash of the payload part of the record */
 
 
-        log_it(L_DEBUG, "Store object: [%s, %s, %d octets]", l_store_obj.group, l_store_obj.key, l_store_obj.value_len);
-                                                                            /* Write has been prepared record in to the DB */
-        if ( ret = dap_chain_global_db_driver_add(&l_store_obj, 1) )
-            return  log_it(L_ERROR, "Write record to DB, code: %d", ret), ret;
+        dap_test_msg("Store object: [%s, %s, %zu octets]", l_store_obj.group, l_store_obj.key, l_store_obj.value_len);
+        ret = dap_global_db_driver_add(&l_store_obj, 1);
+        dap_assert_PIF(!ret, "Write record to DB is ok");
     }
 
-    if ( a_mode )
-    {
-        for ( struct timespec tmo = {0, 300*1024};  !atomic_load(&l_is_completed); tmo.tv_nsec = 300*1024)
-        {
-            log_it(L_NOTICE, "Let's finished DB request ...");
-            nanosleep(&tmo, &tmo);
-        }
-    }
-
-
+//    if ( a_mode )
+//    {
+//        for ( struct timespec tmo = {0, 300*1024};  !atomic_load(&l_is_completed); tmo.tv_nsec = 300*1024)
+//        {
+//            log_it(L_NOTICE, "Let's finished DB request ...");
+//            nanosleep(&tmo, &tmo);
+//        }
+//    }
+    dap_pass_msg("Write test");
     return  0;
 }
 
 static int s_test_read(int a_count)
 {
-dap_store_obj_t *l_store_obj;
-int     l_key_nr;
-char    l_key[64], l_buf[512];
-dap_chain_hash_fast_t csum;
-dap_db_test_record_t    *prec;
+    dap_store_obj_t *l_store_obj;
+    int l_key_nr;
+    char l_key[64], l_buf[512];
+    dap_chain_hash_fast_t csum;
+    dap_db_test_record_t *prec;
 
-    log_it(L_NOTICE, "Start reading %d records ...", a_count);
+    dap_test_msg("Start reading %d records ...", a_count);
 
-    for (l_key_nr = 0; l_key_nr < a_count; l_key_nr++ )
-        {
+    for (l_key_nr = 0; l_key_nr < a_count; l_key_nr++ ) {
         snprintf(l_key, sizeof(l_key) - 1, "KEY$%08x", l_key_nr);           /* Generate a key of record */
 
-        if ( !(l_store_obj = dap_chain_global_db_driver_read(DAP_DB$T_GROUP, l_key, NULL)) )
-             return  log_it(L_ERROR, "Record-Not-Found for key: %s", l_key), -ENOENT;
+        dap_assert_PIF((l_store_obj = dap_global_db_driver_read(DAP_DB$T_GROUP, l_key, NULL)) != NULL, "Record-Not-Found");
 
         prec = (dap_db_test_record_t *) l_store_obj->value;
-
-        log_it(L_DEBUG, "Retrieved object: [%s, %s, %d octets]", l_store_obj->group, l_store_obj->key, l_store_obj->value_len);
-
-        log_it(L_DEBUG, "Record: ['%.*s', %d octets]", prec->len, prec->data, prec->len);
-
-
-        dap_hash_fast (prec->data, prec->len, &csum);                       /* Compute a hash of the payload part of the record */
+        dap_test_msg("Retrieved object: [%s, %s, %d octets]", l_store_obj->group, l_store_obj->key,
+                     l_store_obj->value_len);
+        dap_test_msg("Record: ['%.*s', %d octets]", prec->len, prec->data, prec->len);
+        dap_hash_fast(prec->data, prec->len,
+                      &csum);                       /* Compute a hash of the payload part of the record */
 
 #if 0
         dap_bin2hex (l_buf, prec->csum, sizeof(csum) );
@@ -164,10 +160,10 @@ dap_db_test_record_t    *prec;
         dap_bin2hex (l_buf, csum, sizeof(csum) );
         log_it(L_DEBUG, "%.*s", 2*DAP_HASH_FAST_SIZE, l_buf);
 #endif
-
-        if ( memcmp(&csum, &prec->csum,sizeof(dap_chain_hash_fast_t)) )     /* Integriry checking ... */
-             return  log_it(L_ERROR, "Record with key: %s, check sum error", l_key), -EINVAL;
-        }
+        dap_assert_PIF(memcmp(&csum, &prec->csum, sizeof(dap_chain_hash_fast_t)) == 0,
+                       "Record check sum"); /* Integriry checking ... */
+    }
+    dap_pass_msg("Reading check");
 
     return  0;
 }
@@ -176,58 +172,17 @@ dap_db_test_record_t    *prec;
 static void s_test_close_db(void)
 {
     dap_db_driver_deinit();
+    dap_test_msg("Close global_db");
     log_it(L_NOTICE, "Close global_db");
 }
 
 
 int    main (int argc, char **argv)
 {
-dap_events_t *l_events;
-
-    dap_set_appname("dap_global_db_test");                                  /* Facility prefix for loggin purpose */
-
-    if ( dap_common_init("db_test", "./dbtest.log", "./" ) )                /* Log to console only ! */
-        {
-        fprintf(stderr, "dap_common_init() failed, errno=%d", errno);
-        return -2;
-        }
-
-    // log_it( L_ATT, l_debug_mode ? "*** DEBUG MODE ***" : "*** NORMAL MODE ***" );
-    dap_log_level_set( L_NOTICE );
-
-    /* New event loop init */
-    dap_events_init( 0, 0 );
-
-    if ( !(l_events = dap_events_new()) )
-        return	log_it( L_ERROR, "dap_events_new() failed" ),  -4;
-
-    dap_events_start( l_events );
-
-    /* CuttDB */
-    log_it(L_NOTICE, "Start CuttDB R/W test in Sync mode ...");
-    s_test_create_db("cdb", 0);
+    /* MDBX DB */
+    dap_print_module_name("MDBX R/W SYNC");
+    s_test_create_db("mdbx");
     s_test_write(1350, 0);
     s_test_read(1350);
     s_test_close_db();
-
-
-    log_it(L_NOTICE, "Start CuttDB R/W test in Async mode ...");
-    s_test_create_db("cdb", 1);
-    s_test_write(1350, 1);
-    s_test_read(1350);
-    s_test_close_db();
-
-    /* SQLite3 */
-    log_it(L_NOTICE, "Start SQLITE3 R/W test in Sync mode ...");
-    s_test_create_db("sqlite", 0);
-    s_test_write(1350, 0);
-    s_test_read(1350);
-
-
-    log_it(L_NOTICE, "Start SQLITE3 R/W test in Async mode ...");
-    s_test_create_db("sqlite", 1);
-    s_test_write(1350, 1);
-    s_test_read(1350);
-
-    s_test_close_db();
 }
-- 
GitLab


From cc75e1ef0e821aacc15370e0d9bbd309756c177e Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Fri, 27 Oct 2023 21:32:06 +0700
Subject: [PATCH 08/21] [*] Edit cmake file.

---
 crypto/test/crypto/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/test/crypto/CMakeLists.txt b/crypto/test/crypto/CMakeLists.txt
index f0a05ee5e..b96b3b309 100755
--- a/crypto/test/crypto/CMakeLists.txt
+++ b/crypto/test/crypto/CMakeLists.txt
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10)
 
 project(crypto-test)
 # init CellFrame SDK
-add_definitions("-DDAP_VERSION=\"${CPACK_PACKAGE_VERSION_MAJOR}-${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}\"")
+#add_definitions("-DDAP_VERSION=\"${CPACK_PACKAGE_VERSION_MAJOR}-${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}\"")
 set(SUBMODULES_NO_BUILD ON)
 #include (../../../../cmake/OS_Detection.cmake)
 set(DAPSDK_MODULES "core crypto network-core network-client network-server")
-- 
GitLab


From f8779cb5052572736a8ec5d0f8fdb2bead26d6f1 Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Mon, 30 Oct 2023 21:39:27 +0700
Subject: [PATCH 09/21] [*] Moved functions for getting from a string or
 converting to a string. For values of both unsigned integers and fixed-point
 numbers.

---
 core/include/dap_math_ops.h | 298 ++++++++++++++++++++++++++++++++++++
 1 file changed, 298 insertions(+)

diff --git a/core/include/dap_math_ops.h b/core/include/dap_math_ops.h
index 3c58fc050..f7e11d6cb 100755
--- a/core/include/dap_math_ops.h
+++ b/core/include/dap_math_ops.h
@@ -1116,6 +1116,304 @@ static inline void DIV_256_COIN(uint256_t a, uint256_t b, uint256_t *res)
     *res = a_copy;
 }
 
+/**
+ * @brief dap_uint256_scan_uinteger
+ * Converts a string value to uint256_t. The string value must be an unsigned integer.
+ * @param a_str_integer char*
+ * @return uint256_t
+ */
+uint256_t dap_uint256_scan_uinteger(char *a_str_integer){
+    uint256_t l_ret = uint256_0, l_nul = uint256_0;
+    int  l_strlen;
+    char l_256bit_num[DAP_CHAIN$SZ_MAX256DEC + 1];
+    int overflow_flag = 0;
+
+    if (!a_256bit_num) {
+        return log_it(L_ERROR, "NULL as an argument"), l_nul;
+    }
+
+    /* Convert number from xxx.yyyyE+zz to xxxyyyy0000... */
+    char *l_eptr = strchr(a_256bit_num, 'e');
+    if (!l_eptr)
+        l_eptr = strchr(a_256bit_num, 'E');
+    if (l_eptr) {
+        /* Compute & check length */
+        if ( (l_strlen = strnlen(a_256bit_num, DAP_SZ_MAX256SCINOT + 1) ) > DAP_SZ_MAX256SCINOT)
+            return  log_it(L_ERROR, "Too many digits in `%s` (%d > %d)", a_256bit_num, l_strlen, DAP_SZ_MAX256SCINOT), l_nul;
+
+        char *l_exp_ptr = l_eptr + 1;
+        if (*l_exp_ptr == '+')
+            l_exp_ptr++;
+        int l_exp = atoi(l_exp_ptr);
+        if (!l_exp)
+            return  log_it(L_ERROR, "Invalid exponent %s", l_eptr), uint256_0;
+        char *l_dot_ptr = strchr(a_256bit_num, '.');
+        if (!l_dot_ptr || l_dot_ptr > l_eptr)
+            return  log_it(L_ERROR, "Invalid number format with exponent %d", l_exp), uint256_0;
+        int l_dot_len = l_dot_ptr - a_256bit_num;
+        if (l_dot_len >= DATOSHI_POW256)
+            return log_it(L_ERROR, "Too many digits in '%s'", a_256bit_num), uint256_0;
+        int l_exp_len = l_eptr - a_256bit_num - l_dot_len - 1;
+        if (l_exp_len + l_dot_len + 1 >= DAP_SZ_MAX256SCINOT)
+            return log_it(L_ERROR, "Too many digits in '%s'", a_256bit_num), uint256_0;
+        if (l_exp < l_exp_len) {
+            //todo: we need to handle numbers like 1.23456789000000e9
+            return log_it(L_ERROR, "Invalid number format with exponent %d and number count after dot %d", l_exp,
+                          l_exp_len), uint256_0;
+        }
+        memcpy(l_256bit_num, a_256bit_num, l_dot_len);
+        memcpy(l_256bit_num + l_dot_len, a_256bit_num + l_dot_len + 1, l_exp_len);
+        int l_zero_cnt = l_exp - l_exp_len;
+        if (l_zero_cnt > DATOSHI_POW256) {
+            //todo: need to handle leading zeroes, like 0.000...123e100
+            return log_it(L_ERROR, "Too long number for 256 bit: `%s` (%d > %d)", a_256bit_num, l_strlen, DAP_CHAIN$SZ_MAX256DEC), l_nul;
+        }
+        size_t l_pos = l_dot_len + l_exp_len;
+        for (int i = l_zero_cnt; i && l_pos < DATOSHI_POW256; i--)
+            l_256bit_num[l_pos++] = '0';
+        l_256bit_num[l_pos] = '\0';
+        l_strlen = l_pos;
+
+    } else {
+        // We have a decimal string, not sci notation
+        /* Compute & check length */
+        if ( (l_strlen = strnlen(a_256bit_num, DATOSHI_POW256 + 1) ) > DATOSHI_POW256)
+            return  log_it(L_ERROR, "Too many digits in `%s` (%d > %d)", a_256bit_num, l_strlen, DATOSHI_POW256), l_nul;
+        memcpy(l_256bit_num, a_256bit_num, l_strlen);
+        l_256bit_num[l_strlen] = '\0';
+    }
+
+    for (int i = 0; i < l_strlen ; i++) {
+        char c = l_256bit_num[l_strlen - i - 1];
+        if (!isdigit(c)) {
+            log_it(L_WARNING, "Incorrect input number");
+            return l_nul;
+        }
+        uint8_t l_digit = c - '0';
+        if (!l_digit)
+            continue;
+#ifdef DAP_GLOBAL_IS_INT128
+        uint256_t l_tmp;
+        l_tmp.hi = 0;
+        l_tmp.lo = (uint128_t)c_pow10_double[i].u64[3] * (uint128_t) l_digit;
+        overflow_flag = SUM_256_256(l_ret, l_tmp, &l_ret);
+        if (overflow_flag) {
+            //todo: change string to uint256_max after implementation
+            return log_it(L_ERROR, "Too big number '%s', max number is '%s'", a_256bit_num, "115792089237316195423570985008687907853269984665640564039457584007913129639935"), l_nul;
+        }
+//        if (l_ret.hi == 0 && l_ret.lo == 0) {
+//            return l_nul;
+//        }
+        uint128_t l_mul = (uint128_t) c_pow10_double[i].u64[2] * (uint128_t) l_digit;
+        l_tmp.lo = l_mul << 64;
+        l_tmp.hi = l_mul >> 64;
+        overflow_flag = SUM_256_256(l_ret, l_tmp, &l_ret);
+        if (overflow_flag) {
+            //todo: change string to uint256_max after implementation
+            return log_it(L_ERROR, "Too big number '%s', max number is '%s'", a_256bit_num, "115792089237316195423570985008687907853269984665640564039457584007913129639935"), l_nul;
+        }
+
+        if (l_ret.hi == 0 && l_ret.lo == 0) {
+            return l_nul;
+        }
+
+        l_tmp.lo = 0;
+        l_tmp.hi = (uint128_t) c_pow10_double[i].u64[1] * (uint128_t) l_digit;
+        overflow_flag = SUM_256_256(l_ret, l_tmp, &l_ret);
+        if (overflow_flag) {
+            //todo: change string to uint256_max after implementation
+            return log_it(L_ERROR, "Too big number '%s', max number is '%s'", a_256bit_num, "115792089237316195423570985008687907853269984665640564039457584007913129639935"), l_nul;
+        }
+        if (l_ret.hi == 0 && l_ret.lo == 0) {
+            return l_nul;
+        }
+
+        l_mul = (uint128_t) c_pow10_double[i].u64[0] * (uint128_t) l_digit;
+        if (l_mul >> 64) {
+            log_it(L_WARNING, "Input number is too big");
+            return l_nul;
+        }
+        l_tmp.hi = l_mul << 64;
+        overflow_flag = SUM_256_256(l_ret, l_tmp, &l_ret);
+        if (overflow_flag) {
+            //todo: change string to uint256_max after implementation
+            return log_it(L_ERROR, "Too big number '%s', max number is '%s'", a_256bit_num, "115792089237316195423570985008687907853269984665640564039457584007913129639935"), l_nul;
+        }
+        if (l_ret.hi == 0 && l_ret.lo == 0) {
+            return l_nul;
+        }
+#else
+        uint256_t l_tmp;
+        for (int j = 7; j>=0; j--) {
+            l_tmp = GET_256_FROM_64((uint64_t) c_pow10_double[i].u32[j]);
+            if (IS_ZERO_256(l_tmp)) {
+                if (j < 6) { // in table, we have only 7 and 6 position with 0-es but 5..0 non-zeroes, so if we have zero on 5 or less, there is no significant position anymore
+                    break;
+                }
+                else {
+                    continue;
+                }
+            }
+            LEFT_SHIFT_256(l_tmp, &l_tmp, 32 * (7-j));
+            overflow_flag = MULT_256_256(l_tmp, GET_256_FROM_64(l_digit), &l_tmp);
+            if (overflow_flag) {
+                //todo: change string to uint256_max after implementation
+                return log_it(L_ERROR, "Too big number '%s', max number is '%s'", a_256bit_num, "115792089237316195423570985008687907853269984665640564039457584007913129639935"), l_nul;
+            }
+            overflow_flag = SUM_256_256(l_ret, l_tmp, &l_ret);
+            if (overflow_flag) {
+                //todo: change string to uint256_max after implementation
+                return log_it(L_ERROR, "Too big number '%s', max number is '%s'", a_256bit_num, "115792089237316195423570985008687907853269984665640564039457584007913129639935"), l_nul;
+            }
+        }
+#endif
+    }
+    return l_ret;
+}
+
+/*
+ * @breif dap_uint256_scan_decimal
+ *
+ * Convert a text representation of the coins amount in to
+ * the binary uint256 value .
+ *      Coins string can be in form:
+ *          - "123.00456"
+ *
+ * @param a_str_decimal A text string in format
+ *
+ * @return uint256_t
+ */
+uint256_t dap_uint256_scan_decimal(char *a_str_decimal){
+    int l_len, l_pos;
+    char    l_buf  [DAP_CHAIN$SZ_MAX256DEC + 8] = {0}, *l_point;
+
+    /* "12300000000.0000456" */
+    if ( (l_len = strnlen(a_coins, DATOSHI_POW256 + 2)) > DATOSHI_POW256 + 1)/* Check for legal length */ /* 1 symbol for \0, one for '.', if more, there is an error */
+        return  log_it(L_WARNING, "Incorrect balance format of '%s' - too long (%d > %d)", a_coins,
+                       l_len, DATOSHI_POW256 + 1), uint256_0;
+
+    /* Find , check and remove 'precision' dot symbol */
+    memcpy (l_buf, a_coins, l_len);                                         /* Make local copy */
+    if ( !(l_point = memchr(l_buf, '.', l_len)) )                           /* Is there 'dot' ? */
+        return  log_it(L_WARNING, "Incorrect balance format of '%s' - no precision mark", a_coins),
+                uint256_0;
+
+    l_pos = l_len - (l_point - l_buf);                                      /* Check number of decimals after dot */
+    l_pos--;
+    if ( (l_pos ) >  DATOSHI_DEGREE )
+        return  log_it(L_WARNING, "Incorrect balance format of '%s' - too much precision", l_buf), uint256_0;
+
+    /* "123.456" -> "123456" */
+    memmove(l_point, l_point + 1, l_pos);                                   /* Shift left a right part of the decimal string
+                                                                              to dot symbol place */
+    *(l_point + l_pos) = '\0';
+
+    /* Add trailer zeros:
+     *                pos
+     *                 |
+     * 123456 -> 12345600...000
+     *           ^            ^
+     *           |            |
+     *           +-18 digits--+
+     */
+    memset(l_point + l_pos, '0', DATOSHI_DEGREE - l_pos);
+
+    return dap_cvt_str_to_uint256 (l_buf);
+}
+
+/**
+ * @brief dap_uint256_uninteger_to_char
+ * Convert a uint256_t value to a string value. Uint256_t is treated as an unsigned integer value.
+ * @param a_uint256 unsigned integer value
+ * @return char* String representation of the uint256_t value.
+ */
+char *dap_uint256_uninteger_to_char(uint256_t a_uint256) {
+    char *l_buf = DAP_NEW_Z_SIZE(char, DATOSHI_POW256 + 2); // for decimal dot and trailing zero
+    if (!l_buf) {
+        log_it(L_CRITICAL, "Memory allocation error");
+        return NULL;
+    }
+    int l_pos = 0;
+    uint256_t l_value = a_uint256;
+    uint256_t uint256_ten = GET_256_FROM_64(10);
+    uint256_t rem;
+    do {
+        divmod_impl_256(l_value, uint256_ten, &l_value, &rem);
+#ifdef DAP_GLOBAL_IS_INT128
+        l_buf[l_pos++] = rem.lo + '0';
+#else
+        l_buf[l_pos++] = rem.lo.lo + (unsigned long long) '0';
+#endif
+    } while (!IS_ZERO_256(l_value));
+    int l_strlen = strlen(l_buf) - 1;
+    for (int i = 0; i < (l_strlen + 1) / 2; i++) {
+        char c = l_buf[i];
+        l_buf[i] = l_buf[l_strlen - i];
+        l_buf[l_strlen - i] = c;
+    }
+    return l_buf;
+}
+
+/**
+ * @brief dap_uint256_decimal_to_char
+ *
+ * Converts a value from uint256_t to a string. The uint256_t value is treated as a fixed-point value.
+ *
+ * @param a_uint256
+ * @return char*
+ */
+char *dap_uint256_decimal_to_char(uint256_t a_uint256){
+    char *l_buf, *l_cp;
+    int l_strlen, l_len;
+
+    /* 123000...456 -> "123000...456" */
+    if ( !(l_buf = dap_cvt_uint256_to_str(a_balance)) )
+        return NULL;
+
+    l_strlen = strlen(l_buf);
+
+    if ( 0 < (l_len = (l_strlen - DATOSHI_DEGREE)) )
+    {
+        l_cp = l_buf + l_len;                                               /* Move last 18 symbols to one position right */
+        memmove(l_cp + 1, l_cp, DATOSHI_DEGREE);
+        *l_cp = '.';                                                        /* Insert '.' separator */
+
+        l_strlen++;                                                         /* Adjust string len in the buffer */
+    } else {
+        l_len = DATOSHI_DEGREE - l_strlen;                           /* Add leading "0." */
+        l_cp = l_buf;
+        memmove(l_cp + l_len + 2, l_cp, DATOSHI_DEGREE - l_len);                                     /* Move last 18 symbols to 2 positions right */
+        memset(l_cp, '0', l_len + 2);
+        *(++l_cp) = '.';
+        l_strlen += 2;                                                      /* Adjust string len in the buffer */
+    }
+
+    if ( *(l_cp = l_buf) == '0' )                                           /* Is there lead zeroes ? */
+    {
+        /* 000000000000000000000.000000000000000001 */
+        /* 000000000000000000123.000000000000000001 */
+        for ( l_cp += 1; *l_cp == '0'; l_cp++);                             /* Skip all '0' symbols */
+
+        if ( *l_cp == '.' )                                                 /* l_cp point to separator - then step back */
+            l_cp--;
+
+        if ( (l_len = (l_cp - l_buf)) )
+        {
+            l_len = l_strlen - l_len;                                       /* A part of the buffer to be moved to begin */
+            memmove(l_buf, l_cp, l_len);                                    /* Move and terminated by zero */
+            l_buf[l_len] = '\0';
+        }
+
+        l_strlen = l_len;                                                   /* Adjust string len in the buffer */
+    }
+
+    for ( l_cp = l_buf + strlen(l_buf) - 1; *l_cp == '0' && l_cp >= l_buf; l_cp--)
+        if (*(l_cp - 1) != '.')
+            *l_cp = '\0';
+
+    return l_buf;
+}
+
 #ifdef __cplusplus
 }
 #endif
-- 
GitLab


From 4be2b3ae8d55a8ce75b92e975c3bcaf0685ad3f0 Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Mon, 30 Oct 2023 22:27:04 +0700
Subject: [PATCH 10/21] [*] Moved test for uint256_t from cellframe-sdk.

---
 core/test/CMakeLists.txt           |    1 +
 core/test/uint256_t/256_tests.cc   | 3326 ++++++++++++++++++++++++++++
 core/test/uint256_t/CMakeLists.txt |   52 +
 3 files changed, 3379 insertions(+)
 create mode 100644 core/test/uint256_t/256_tests.cc
 create mode 100644 core/test/uint256_t/CMakeLists.txt

diff --git a/core/test/CMakeLists.txt b/core/test/CMakeLists.txt
index 06e68949d..0d3ed2528 100755
--- a/core/test/CMakeLists.txt
+++ b/core/test/CMakeLists.txt
@@ -67,3 +67,4 @@ if(UNIX)
     target_include_directories(${PROJECT_NAME} PRIVATE unix)
     target_include_directories(${PROJECT_NAME} PRIVATE unix/linux)
 endif()
+add_subdirectory(uint256_t)
diff --git a/core/test/uint256_t/256_tests.cc b/core/test/uint256_t/256_tests.cc
new file mode 100644
index 000000000..92b23974a
--- /dev/null
+++ b/core/test/uint256_t/256_tests.cc
@@ -0,0 +1,3326 @@
+#include <gtest/gtest.h>
+
+#include <boost/program_options/options_description.hpp>
+#include <boost/program_options/option.hpp>
+#include <boost/multiprecision/cpp_bin_float.hpp>
+#include <boost/multiprecision/cpp_int.hpp>
+#include <boost/random.hpp>
+using namespace std;
+#include <iostream>
+
+//#include "dap_chain_common.h"
+#include "dap_math_ops.h"
+
+#include "gtest/gtest-spi.h"
+
+
+#define MAX64STR "18446744073709551615"
+#define MIN128STR "18446744073709551616"
+#define MAX128STR "340282366920938463463374607431768211455"
+#define MIN256STR "340282366920938463463374607431768211456"
+#define MAX256STR "115792089237316195423570985008687907853269984665640564039457584007913129639935"
+
+
+uint64_t one_bits[] = {0, 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80,
+                          0x100, 0x200, 0x400, 0x800, 0x1000, 0x2000,
+                          0x4000, 0x8000, 0x10000, 0x20000, 0x40000,
+                          0x80000, 0x100000, 0x200000, 0x400000,
+                          0x800000, 0x1000000, 0x2000000, 0x4000000,
+                          0x8000000, 0x10000000, 0x20000000, 0x40000000,
+                          0x80000000, 0x100000000, 0x200000000, 0x400000000,
+                          0x800000000, 0x1000000000, 0x2000000000,
+                          0x4000000000, 0x8000000000, 0x10000000000,
+                          0x20000000000, 0x40000000000, 0x80000000000,
+                          0x100000000000, 0x200000000000, 0x400000000000,
+                          0x800000000000, 0x1000000000000, 0x2000000000000,
+                          0x4000000000000, 0x8000000000000, 0x10000000000000,
+                          0x20000000000000, 0x40000000000000, 0x80000000000000,
+                          0x100000000000000, 0x200000000000000,
+                          0x400000000000000, 0x800000000000000,
+                          0x1000000000000000, 0x2000000000000000,
+                          0x4000000000000000, 0x8000000000000000};
+
+uint64_t all_bits[] = {0, 0x1, 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff,
+                       0x1ff, 0x3ff, 0x7ff, 0xfff, 0x1fff, 0x3fff, 0x7fff,
+                       0xffff, 0x1ffff, 0x3ffff, 0x7ffff, 0xfffff, 0x1fffff,
+                       0x3fffff, 0x7fffff, 0xffffff, 0x1ffffff, 0x3ffffff, 0x7ffffff,
+                       0xfffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff, 0xffffffff,
+                       0x1ffffffff, 0x3ffffffff, 0x7ffffffff, 0xfffffffff, 0x1fffffffff,
+                       0x3fffffffff, 0x7fffffffff, 0xffffffffff, 0x1ffffffffff,
+                       0x3ffffffffff, 0x7ffffffffff, 0xfffffffffff, 0x1fffffffffff,
+                       0x3fffffffffff, 0x7fffffffffff, 0xffffffffffff, 0x1ffffffffffff,
+                       0x3ffffffffffff, 0x7ffffffffffff, 0xfffffffffffff, 0x1fffffffffffff,
+                       0x3fffffffffffff, 0x7fffffffffffff, 0xffffffffffffff, 0x1ffffffffffffff,
+                       0x3ffffffffffffff, 0x7ffffffffffffff, 0xfffffffffffffff, 0x1fffffffffffffff,
+                       0x3fffffffffffffff, 0x7fffffffffffffff, 0xffffffffffffffff};
+
+namespace bmp = boost::multiprecision;
+
+class RandomTests : public ::testing::Test {
+protected:
+    void SetUp() override {
+        gen512.seed(clock());
+        gen256.seed(clock());
+        gen128.seed(clock());
+    }
+    typedef boost::random::independent_bits_engine<boost::random::mt19937, 512, bmp::cpp_int> generator_type_512;
+    typedef boost::random::independent_bits_engine<boost::random::mt19937, 256, bmp::cpp_int> generator_type_256;
+    typedef boost::random::independent_bits_engine<boost::random::mt19937, 128, bmp::cpp_int> generator_type_128;
+
+    generator_type_512 gen512;
+    generator_type_256 gen256;
+    generator_type_128 gen128;
+};
+
+class RandomInputTests : public RandomTests {
+
+};
+
+class DISABLED_RandomInputTestsCoins: public RandomInputTests {
+
+};
+
+class RandomOutputTests: public RandomTests {
+
+};
+
+class RandomComparisonTests: public RandomTests {
+
+};
+
+class RandomBitTests: public RandomTests {
+
+};
+
+class RandomMathTests: public RandomTests {
+
+};
+
+class Parameterized64Input:
+public testing::TestWithParam<uint64_t> {
+
+};
+
+
+// TODO: we need some tests with math-writing, like xxx.yyyyyE+zz, xxx.yyyye+zzz done
+// TODO: maybe we can use predicates for two-string-comparision? We CANT use compare256, as it can brake all tests, if it wron. Or can we?
+// TODO: need to do some tests for non-native 128-bit, like on armv7_32 (like one on raspberry)
+// TODO: need to check stderr (or stdout?) for logging.
+// TODO: need to split tests
+// TODO: need to add some tests to bit-logic, like 0b0101 & 0b1010 and 0b0101 | 0b1010
+// TODO: do we need to run random tests more than one? I think yes, but not in cycle. I think Google Tests can do this, need to implement
+// TODO: need to run tests without define DAP_GLOBAL_IS_INT128 (i.e on 32-bit system or with disabling this feature by hand
+// TODO: Add 64 and 128 tests for arithmetics
+// TODO: Rework tests for using predicates, not ASSERT_EQ chains or ASSERT_STREQ
+
+
+
+
+// Comparison functions
+void check_equality256(uint256_t a, bmp::uint256_t boost_a) {
+#ifdef DAP_GLOBAL_IS_INT128
+    ASSERT_EQ(a.lo, ((boost_a & bmp::uint256_t("0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff")) >> 0)) << "boost_a is: " << boost_a;
+    ASSERT_EQ(a.hi, ((boost_a & bmp::uint256_t("0xffffffffffffffffffffffffffffffff00000000000000000000000000000000")) >> 128)) << "boost_a is: " << boost_a;
+#else
+    ASSERT_EQ(a.lo.lo, ((boost_a & bmp::uint256_t("0x000000000000000000000000000000000000000000000000ffffffffffffffff")) >> 0)) << "boost_a is: " << boost_a;
+    ASSERT_EQ(a.lo.hi, ((boost_a & bmp::uint256_t("0x00000000000000000000000000000000ffffffffffffffff0000000000000000")) >> 64)) << "boost_a is: " << boost_a;
+    ASSERT_EQ(a.hi.lo, ((boost_a & bmp::uint256_t("0x0000000000000000ffffffffffffffff00000000000000000000000000000000")) >> 128)) << "boost_a is: " << boost_a;
+    ASSERT_EQ(a.hi.hi, ((boost_a & bmp::uint256_t("0xffffffffffffffff000000000000000000000000000000000000000000000000")) >> 192)) << "boost_a is: " << boost_a;
+#endif
+}
+
+void check_equality256(uint256_t a, uint64_t aa) {
+    bmp::uint256_t boost_a = bmp::uint256_t(aa);
+    check_equality256(a, boost_a);
+}
+
+void check_equality256(uint256_t a, string aa) {
+    bmp::uint256_t boost_a = bmp::uint256_t(aa);
+    check_equality256(a, boost_a);
+}
+
+
+
+TEST(InputTests, ZeroInputBase) {
+    uint256_t a = uint256_0;
+
+    check_equality256(a, 0);
+}
+
+TEST_P(Parameterized64Input, Input) {
+    uint64_t a = GetParam();
+    check_equality256(dap_chain_uint256_from(a), a);
+}
+INSTANTIATE_TEST_SUITE_P(OneBit, Parameterized64Input, testing::ValuesIn(one_bits));
+INSTANTIATE_TEST_SUITE_P(AllBit, Parameterized64Input, testing::ValuesIn(all_bits));
+
+TEST(InputTests, ZeroInputFromString) {
+    uint256_t a = uint256_0;
+
+    check_equality256(a, 0);
+}
+
+TEST(InputTests, MaxInputFromString) {
+    uint256_t a = dap_chain_balance_scan(MAX64STR);
+
+    check_equality256(a, MAX64STR);
+}
+
+TEST(InputTests, Min128FromString) {
+    uint256_t a = dap_chain_balance_scan(MIN128STR);
+
+    check_equality256(a, MIN128STR);
+}
+
+TEST(InputTests, Max128FromString) {
+    uint256_t a = dap_chain_balance_scan(MAX128STR);
+
+    check_equality256(a, MAX128STR);
+}
+
+TEST(InputTests, Min256FromString) {
+    uint256_t a = dap_chain_balance_scan(MIN256STR);
+
+    check_equality256(a, MIN256STR);
+}
+
+TEST(InputTests, Max256FromString) {
+    uint256_t a = dap_chain_balance_scan(MAX256STR);
+
+    check_equality256(a, MAX256STR);
+}
+
+TEST(InputTests, EmptyInput) {
+    uint256_t a = dap_chain_balance_scan("");
+
+    check_equality256(a, 0);
+}
+
+TEST(InputTests, NullInput) {
+    uint256_t a = dap_chain_balance_scan(NULL);
+
+    check_equality256(a, 0);
+}
+
+TEST(InputTests, TooLongInputSome) {
+    //some decimal symbols more
+    uint256_t a = dap_chain_balance_scan("11579208923731619542357098500868790785326998466564056403945758400791312963993123465");
+
+    check_equality256(a, 0);
+}
+
+TEST(InputTests, TooLongInputOne) {
+    //one decimal symbol more
+    uint256_t a = dap_chain_balance_scan("1157920892373161954235709850086879078532699846656405640394575840079131296399351");
+
+    check_equality256(a, 0);
+}
+
+TEST(InputTests, OverflowTestLeastBit) {
+    //one bit more (like decimal 6 instead of decimal 5 on last symbol)
+    uint256_t a = dap_chain_balance_scan("115792089237316195423570985008687907853269984665640564039457584007913129639936");
+
+    check_equality256(a, 0);
+}
+
+TEST(InputTests, OverflowTestsMostBit) {
+    //2 instead of 1 one most-significant digit
+    uint256_t a = dap_chain_balance_scan("215792089237316195423570985008687907853269984665640564039457584007913129639935");
+
+    check_equality256(a, 0);
+}
+
+TEST(InputTests, OverflowTestsNotMostBit) {
+    //2 instead of 1 one most-significant digit
+    uint256_t a = dap_chain_balance_scan("125792089237316195423570985008687907853269984665640564039457584007913129639935");
+
+    check_equality256(a, 0);
+}
+
+TEST(InputTests, NonDigitSymbolsInputHexadermical) {
+    uint256_t a = dap_chain_balance_scan("123a23");
+    //todo: check that this is logging
+
+    check_equality256(a, 0);
+}
+
+TEST(InputTests, NonDigitSymbolsInputNonHexadermicalLead) {
+    uint256_t a = dap_chain_balance_scan("hhh123");
+
+    check_equality256(a, 0);
+}
+
+TEST(InputTests, NonDigitSymbolsInputNonHexadermicalTail) {
+    uint256_t a = dap_chain_balance_scan("11579208923731619542357098500868790785326998466564056403945758400791312963993q");
+
+    check_equality256(a, 0);
+}
+
+
+TEST(InputTests, LeadingZeroesOne) {
+    uint256_t a = dap_chain_balance_scan("01");
+
+    check_equality256(a, 1);
+}
+
+TEST(InputTests, LeadingZeroesMany) {
+    uint256_t a = dap_chain_balance_scan("0000000001");
+
+    check_equality256(a, 1);
+}
+
+TEST(InputTests, LeadingZeroesAlot) {
+    //exactly 78
+    uint256_t a = dap_chain_balance_scan("000000000000000000000000000000000000000000000000000000000000000000000000000001");
+
+    check_equality256(a, 1);
+}
+
+TEST(InputTests, ScientificInputSimplePlus) {
+    uint256_t a = dap_chain_balance_scan("1.0e+10");
+
+    check_equality256(a, 10000000000);
+}
+
+TEST(InputTests, ScientificInputSimple) {
+    uint256_t a = dap_chain_balance_scan("1.0e10");
+
+    check_equality256(a, 10000000000);
+}
+
+TEST(InputTests, ScientificInputSimpleCapital) {
+    uint256_t a = dap_chain_balance_scan("1.0E+10");
+
+    check_equality256(a, 10000000000);
+}
+
+TEST(DISABLED_InputTests, ScientificInputSimpleNotImportantZeroes) {
+    //todo: turn this on, when we can handle this
+
+    uint256_t a = dap_chain_balance_scan("1.23456789000000e9");
+
+
+    check_equality256(a, 1234567890);
+}
+
+TEST(DISABLED_InputTests, ScientificInputSimpleNotImportantZeroesAtAll) {
+
+    uint256_t a = dap_chain_balance_scan("1.234000000000000000000000000000e+3");
+
+    check_equality256(a, 1234);
+}
+
+TEST(InputTests, ScientificInputSimpleMax64) {
+    uint256_t a = dap_chain_balance_scan("1.8446744073709551615e19");
+
+    check_equality256(a, 0xffffffffffffffff);
+}
+
+TEST(InputTests, ScientificInputSimpleMax64Plus) {
+    uint256_t a = dap_chain_balance_scan("1.8446744073709551615e+19");
+
+    check_equality256(a, 0xffffffffffffffff);
+}
+
+TEST(InputTests, ScientificInputSimpleMin128) {
+    uint256_t a = dap_chain_balance_scan("1.8446744073709551616e19");
+
+    check_equality256(a, MIN128STR);
+}
+
+TEST(InputTests, ScientificIncputSimpleMin128Plus) {
+    uint256_t a = dap_chain_balance_scan("1.8446744073709551616e+19");
+
+    check_equality256(a, MIN128STR);
+}
+
+TEST(InputTests, ScientificInputSimple128Max) {
+    uint256_t a = dap_chain_balance_scan("3.40282366920938463463374607431768211455e38");
+
+    check_equality256(a, MAX128STR);
+}
+
+TEST(InputTests, ScientificInputSimple256Min) {
+    uint256_t a = dap_chain_balance_scan("3.40282366920938463463374607431768211456e38");
+
+    check_equality256(a, MIN256STR);
+}
+
+TEST(InputTests, ScientificInputSimple256Max) {
+    uint256_t a = dap_chain_balance_scan("1.15792089237316195423570985008687907853269984665640564039457584007913129639935e77");
+
+    check_equality256(a, MAX256STR);
+}
+
+TEST(InputTests, ScientificInputSimple256MaxPlus) {
+    uint256_t a = dap_chain_balance_scan("1.15792089237316195423570985008687907853269984665640564039457584007913129639935e+77");
+
+    check_equality256(a, MAX256STR);
+}
+
+TEST(InputTests, ScientificInputSimpleLessThanOne) {
+    uint256_t a = dap_chain_balance_scan("0.1e1");
+
+    check_equality256(a, 1);
+}
+
+TEST(InputTests, ScientificInputSimpleMoreThanTwo) {
+    uint256_t a = dap_chain_balance_scan("123.123e3");
+
+    check_equality256(a, 123123);
+}
+
+TEST(InputTests, ScientificInputSimpleMaxAndMoreThanTwo) {
+    uint256_t a = dap_chain_balance_scan("11579208923731619542357098500868790785326998466564056403945758400791.3129639935e10");
+
+    check_equality256(a, MAX256STR);
+}
+
+TEST(InputTests, IncorrectScientificInputMorePluses) {
+    uint256_t a = dap_chain_balance_scan("1.0E+++10");
+
+    check_equality256(a, 0);
+}
+
+TEST(InputTests, IncorrectScientificInputMoreExps) {
+    uint256_t a = dap_chain_balance_scan("1.0EEE+10");
+
+    check_equality256(a, 0);
+}
+
+TEST(InputTests, IncorrectScientificInputMoreDots) {
+    uint256_t a = dap_chain_balance_scan("1.1.1e3");
+
+    check_equality256(a, 0);
+}
+
+TEST(InputTests, IncorrectScientificInputFractionPart){
+    // with fraction part
+    uint256_t a = dap_chain_balance_scan("1.123e2");
+
+    check_equality256(a, 0);
+}
+
+TEST(InputTests, TooLongScientificInputOneSymb) {
+    //one symbol more
+    uint256_t a = dap_chain_balance_scan("1.157920892373161954235709850086879078532699846656405640394575840079131296399356e+78");
+
+    check_equality256(a, 0);
+}
+
+TEST(InputTests, TooLongScientificInputTenSymbs) {
+    //ten symbols more
+    uint256_t a = dap_chain_balance_scan("1.157920892373161954235709850086879078532699846656405640394575840079131296399351234567890e+88");
+
+    check_equality256(a, 0);
+}
+
+
+//todo: make some more tests for better coverage (see coverage on dap_chain_balance_scan)
+TEST(InputTests, OverflowScientificInputBigExp) {
+     uint256_t a = dap_chain_balance_scan("1.0e100");
+
+    check_equality256(a, 0);
+}
+
+TEST(InputTests, OverflowScientificInputOneBit) {
+    //last symb changed
+    uint256_t a = dap_chain_balance_scan("1.15792089237316195423570985008687907853269984665640564039457584007913129639936e+77");
+
+    check_equality256(a, 0);
+}
+
+TEST(InputTests, OverflowScientificInputHighBit) {
+    uint256_t a = dap_chain_balance_scan("1.25792089237316195423570985008687907853269984665640564039457584007913129639935e+77");
+
+    check_equality256(a, 0);
+}
+
+TEST(InputTests, OverflowScientificInputHighBit2) {
+    uint256_t a = dap_chain_balance_scan("2.15792089237316195423570985008687907853269984665640564039457584007913129639935e+77");
+
+    check_equality256(a, 0);
+}
+
+TEST_F(DISABLED_RandomInputTestsCoins, CoinsBase) {
+    //todo: fraction part should be 18 or less symbols, not more. For now it can be more and i dont know what to do with it
+
+
+//    boost::random::uniform_real_distribution<
+//            boost::multiprecision::number<
+//                    boost::multiprecision::cpp_bin_float<
+//                            16, boost::multiprecision::backends::digit_base_10
+//                            >
+//                            >
+//                            > ur(0, 1);
+//    boost::random::independent_bits_engine<
+//            boost::mt19937,
+//            std::numeric_limits<
+////                    boost::multiprecision::cpp_bin_float_100
+//                    boost::multiprecision::number<
+//                            boost::multiprecision::cpp_bin_float<
+//                                    16
+//                                    >
+//                                    >
+//                    >::digits,
+//                    boost::multiprecision::cpp_int> gen;
+//
+//
+//    for (int i = 0; i<100; i++) {
+//        std::cout << ur(gen).str().c_str() << std::endl;
+//    }
+//
+////    ASSERT_FALSE(true);
+//    boost::multiprecision::cpp_bin_float_100 c(gen256().str() + ".0");
+//    boost::multiprecision::cpp_bin_float_100 b = ur(gen) + c;
+//
+//    uint256_t a = dap_chain_coins_to_balance(b.str().c_str());
+//
+//    ASSERT_STREQ(dap_chain_balance_to_coins(a), b.str().c_str());
+}
+
+
+TEST(OutputTests, ZeroOutputBase) {
+    uint256_t zero = uint256_0;
+    ASSERT_STREQ(dap_chain_balance_print(zero), "0");
+}
+
+TEST(OutputTests, Max64Output) {
+    uint256_t max = GET_256_FROM_64(0xffffffffffffffff);
+    ASSERT_STREQ(dap_chain_balance_print(max), "18446744073709551615");
+}
+
+TEST(OutputTests, Min128Output) {
+    uint256_t min = dap_chain_balance_scan("18446744073709551616");
+    ASSERT_STREQ(dap_chain_balance_print(min), "18446744073709551616");
+}
+
+TEST(OutputTests, Max128Output) {
+    uint256_t max = dap_chain_balance_scan("340282366920938463463374607431768211455");
+    ASSERT_STREQ(dap_chain_balance_print(max), "340282366920938463463374607431768211455");
+}
+
+TEST(OutputTests, Min256Output) {
+    uint256_t min = dap_chain_balance_scan("340282366920938463463374607431768211456");
+    ASSERT_STREQ(dap_chain_balance_print(min), "340282366920938463463374607431768211456");
+}
+
+TEST(OutputTests, Max256Output) {
+    uint256_t max = dap_chain_balance_scan("115792089237316195423570985008687907853269984665640564039457584007913129639935");
+    ASSERT_STREQ(dap_chain_balance_print(max), "115792089237316195423570985008687907853269984665640564039457584007913129639935");
+}
+
+TEST_F(RandomOutputTests, Output256){
+    bmp::uint256_t boost_a(gen256());
+
+    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+    ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+}
+
+TEST(InputTests, Get256From128) {
+    uint128_t a = GET_128_FROM_64(123);
+    uint256_t b = GET_256_FROM_128(a);
+    check_equality256(b, 123);
+}
+
+TEST_F(RandomInputTests, Input256) {
+    bmp::uint256_t boost_a(gen256());
+
+    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+    check_equality256(a, boost_a);
+}
+
+TEST(ComparisonTests, Equal128Eq) {
+    uint128_t a, b;
+
+    a = GET_128_FROM_64(0);
+    b = GET_128_FROM_64(0);
+
+    ASSERT_TRUE(EQUAL_128(a, b));
+}
+
+TEST(ComparisonTests, Equal128Neq) {
+    uint128_t a, b;
+
+    a = GET_128_FROM_64(1);
+    b = GET_128_FROM_64(0);
+
+    ASSERT_FALSE(EQUAL_128(a, b));
+}
+
+
+TEST(ComparisonTests, Equal256Zeroes) {
+    uint256_t a, b;
+
+    a = GET_256_FROM_64(0);
+    b = GET_256_FROM_64(0);
+
+    ASSERT_TRUE(EQUAL_256(a, b));
+}
+
+TEST(ComparisonTests, Equal256ZeroOne) {
+    uint256_t a, b;
+
+    a = GET_256_FROM_64(1);
+    b = GET_256_FROM_64(0);
+
+    ASSERT_FALSE(EQUAL_256(a, b));
+}
+
+TEST(ComparisonTests, Equal256Min128Zero) {
+    uint256_t a, b;
+
+    a = dap_chain_balance_scan(MIN128STR);
+    b = GET_256_FROM_64(0);
+
+    ASSERT_FALSE(EQUAL_256(a, b));
+}
+
+TEST(ComparisonTests, Equal256Max64Min128) {
+    uint256_t a, b;
+
+    a = dap_chain_balance_scan(MIN128STR);
+    b = dap_chain_balance_scan(MAX64STR);
+
+    ASSERT_FALSE(EQUAL_256(a, b));
+}
+
+TEST(ComparisonTests, Equal256Min128Min128) {
+    uint256_t a, b;
+
+    a = dap_chain_balance_scan(MIN128STR);
+    b = dap_chain_balance_scan(MIN128STR);
+
+    ASSERT_TRUE(EQUAL_256(a, b));
+}
+
+TEST(ComparisonTests, Equal256Max128Min128){
+    uint256_t a, b;
+
+    a = dap_chain_balance_scan(MAX128STR);
+    b = dap_chain_balance_scan(MIN128STR);
+
+    ASSERT_FALSE(EQUAL_256(a, b));
+}
+
+TEST(ComparisonTests, Equal256Max128Min256) {
+    uint256_t a, b;
+
+    a = dap_chain_balance_scan(MAX128STR);
+    b = dap_chain_balance_scan(MIN256STR);
+
+    ASSERT_FALSE(EQUAL_256(a, b));
+
+}
+
+TEST(ComparisonTests, Equal256Max256Min256) {
+    uint256_t a, b;
+
+    a = dap_chain_balance_scan(MAX256STR);
+    b = dap_chain_balance_scan(MIN256STR);
+
+    ASSERT_FALSE(EQUAL_256(a, b));
+}
+
+TEST(ComparisonTests, Equal256Max256Max256) {
+    uint256_t a, b;
+
+    a = dap_chain_balance_scan(MAX256STR);
+    b = dap_chain_balance_scan(MAX256STR);
+
+    ASSERT_TRUE(EQUAL_256(a, b));
+}
+
+TEST(ComparisonTests, Equal256Max256Zero) {
+    uint256_t a, b;
+
+    a = dap_chain_balance_scan(MAX256STR);
+    b = dap_chain_balance_scan("0");
+
+    ASSERT_FALSE(EQUAL_256(a, b));
+}
+
+TEST_F(RandomComparisonTests, Equal256) {
+    bmp::uint256_t boost_a(gen128());
+
+    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+    uint256_t b = dap_chain_balance_scan(boost_a.str().c_str());
+
+    ASSERT_TRUE(EQUAL_256(a, b));
+}
+
+TEST(ComparisonTests, IsZeroTest128True) {
+    uint128_t a = uint128_0;
+
+    ASSERT_TRUE(IS_ZERO_128(a));
+}
+
+TEST(ComparisonTests, IsZeroTest128False) {
+    uint128_t a = uint128_1;
+
+    ASSERT_FALSE(IS_ZERO_128(a));
+}
+
+TEST(ComparisonTests, IsZeroTest256True) {
+    uint256_t a = uint256_0;
+
+    ASSERT_TRUE(IS_ZERO_256(a));
+}
+
+TEST(ComparisonTests, IsZeroTest256TrueChanged) {
+    uint256_t a = uint256_1;
+
+#ifdef DAP_GLOBAL_IS_INT128
+    a.lo = 0;
+    a.hi = 0;
+#else
+    a.lo.lo = 0;
+    a.lo.hi = 0;
+    a.hi.lo = 0;
+    a.hi.hi = 0;
+#endif
+
+    ASSERT_TRUE(IS_ZERO_256(a));
+}
+
+TEST(ComparisonTests, IsZeroTest256False) {
+    uint256_t a = uint256_1;
+
+    ASSERT_FALSE(IS_ZERO_256(a));
+}
+
+TEST(ComparisonTests, IsZeroTest256FalseChangedLo) {
+    uint256_t a = uint256_0;
+
+#ifdef DAP_GLOBAL_IS_INT128
+    a.lo = 1;
+    a.hi = 0;
+#else
+    a.lo.lo = 1;
+    a.lo.hi = 0;
+    a.hi.lo = 0;
+    a.hi.hi = 0;
+#endif
+
+    ASSERT_FALSE(IS_ZERO_256(a));
+}
+
+TEST(ComparisonTests, IsZeroTest256FalseChangedHi){
+    uint256_t a = uint256_0;
+
+#ifdef DAP_GLOBAL_IS_INT128
+    a.lo = 0;
+    a.hi = 1;
+#else
+    a.lo.lo = 0;
+    a.lo.hi = 0;
+    a.hi.lo = 1;
+    a.hi.hi = 0;
+#endif
+
+    ASSERT_FALSE(IS_ZERO_256(a));
+}
+
+TEST(ComparisonTests, IsZeroTest256TrueFromBalance) {
+    uint256_t a = dap_chain_balance_scan("0");
+
+    ASSERT_TRUE(IS_ZERO_256(a));
+}
+
+TEST(ComparisonTests, IsZeroTest256FalseFromBalanceMax128) {
+    uint256_t a = dap_chain_balance_scan(MAX128STR);
+
+    ASSERT_FALSE(IS_ZERO_256(a));
+}
+
+TEST(ComparisonTests, IsZeroTest256FalseFromBalanceMax256) {
+    uint256_t a = dap_chain_balance_scan(MAX256STR);
+
+    ASSERT_FALSE(IS_ZERO_256(a));
+}
+
+TEST_F(RandomComparisonTests, IsZeroTest) {
+    bmp::uint256_t boost_a(gen256());
+
+    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+
+    if (boost_a == 0) {
+        ASSERT_TRUE(IS_ZERO_256(a));
+    }
+    else {
+        ASSERT_FALSE(IS_ZERO_256(a));
+    }
+
+}
+
+TEST(BitTests, And128) {
+    uint128_t a = uint128_0;
+    uint128_t b = uint128_1;
+    uint128_t c = AND_128(a, b);
+    uint128_t d = AND_128(b, a);
+    uint128_t e = AND_128(a, a);
+    uint128_t f = AND_128(b, b);
+
+#ifdef DAP_GLOBAL_IS_INT128
+    ASSERT_EQ(c, uint128_0);
+    ASSERT_EQ(d, uint128_0);
+    ASSERT_EQ(e, uint128_0);
+    ASSERT_EQ(f, uint128_1);
+#else
+    ASSERT_EQ(c.lo, uint128_0.lo);
+    ASSERT_EQ(c.hi, uint128_0.hi);
+    ASSERT_EQ(d.lo, uint128_0.lo);
+    ASSERT_EQ(d.hi, uint128_0.hi);
+    ASSERT_EQ(e.lo, uint128_0.lo);
+    ASSERT_EQ(e.hi, uint128_0.hi);
+    ASSERT_EQ(f.lo, uint128_1.lo);
+    ASSERT_EQ(f.hi, uint128_1.hi);
+#endif
+}
+
+TEST(BitTests, Or128) {
+    uint128_t a = uint128_0;
+    uint128_t b = uint128_1;
+    uint128_t c = OR_128(a, b);
+    uint128_t d = OR_128(b, a);
+    uint128_t e = OR_128(a, a);
+    uint128_t f = OR_128(b, b);
+
+
+#ifdef DAP_GLOBAL_IS_INT128
+    ASSERT_EQ(c, uint128_1);
+    ASSERT_EQ(d, uint128_1);
+    ASSERT_EQ(e, uint128_0);
+    ASSERT_EQ(f, uint128_1);
+#else
+    ASSERT_EQ(c.lo, uint128_1.lo);
+    ASSERT_EQ(c.hi, uint128_1.hi);
+    ASSERT_EQ(d.lo, uint128_1.lo);
+    ASSERT_EQ(d.hi, uint128_1.hi);
+    ASSERT_EQ(e.lo, uint128_0.lo);
+    ASSERT_EQ(e.hi, uint128_0.hi);
+    ASSERT_EQ(f.lo, uint128_1.lo);
+    ASSERT_EQ(f.hi, uint128_1.hi);
+#endif
+}
+
+TEST(BitTests, And256ZeroZero) {
+    uint256_t a = uint256_0;
+    uint256_t b = uint256_1;
+    uint256_t c;
+
+    //todo: shuld we use ASSERT_EQ with lo and hi? It would be bad for 32-bit only systems
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, a)), dap_chain_balance_print(uint256_0));
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, a)), dap_chain_balance_print(uint256_0));
+}
+
+TEST(BitTests, And256ZeroOne) {
+    uint256_t a, b,c;
+    a = uint256_0;
+    b = uint256_1;
+    c = uint256_0;
+
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(uint256_0));
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(uint256_0));
+
+}
+
+TEST(BitTests, And256OneOne) {
+    uint256_t a, b,c;
+    a = uint256_1;
+    b = uint256_1;
+    c = uint256_0;
+
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(uint256_1));
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(uint256_1));
+}
+
+TEST(BitTests, And256Max64Zebra) {
+    uint256_t a, b,c;
+
+
+    a = dap_chain_balance_scan(MAX64STR);               //0b1111111111111111111111111111111111111111111111111111111111111111
+    b = dap_chain_balance_scan("12297829382473034410"); //0b1010101010101010101010101010101010101010101010101010101010101010
+    c = b; //0b1010101010101010101010101010101010101010101010101010101010101010
+
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(c));
+}
+
+TEST(BitTests, And256Max64Halves) {
+    uint256_t a, b,c;
+
+    a = dap_chain_balance_scan(MAX64STR);               //0b1111111111111111111111111111111111111111111111111111111111111111
+    b = dap_chain_balance_scan("18446744069414584320");             //0b1111111111111111111111111111111100000000000000000000000000000000
+    c = b;             //0b1111111111111111111111111111111100000000000000000000000000000000
+
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(c));
+}
+
+
+TEST(BitTests, And256Max64DiffHalves) {
+    uint256_t a, b,c;
+
+    a = dap_chain_balance_scan("18446744069414584320");             //0b1111111111111111111111111111111100000000000000000000000000000000
+    b = dap_chain_balance_scan("4294967295");                       //0b0000000000000000000000000000000011111111111111111111111111111111
+    c = uint256_0;
+
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(c));
+}
+
+
+TEST(BitTests, And256Max128Zebra ) {
+    uint256_t a, b,c;
+
+    a = dap_chain_balance_scan(MAX128STR);                                             //0b11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+    b = dap_chain_balance_scan("226854911280625642308916404954512140970");             //0b10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
+    c = b;                                                                                      //0b10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
+
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(c));
+}
+
+TEST(BitTests, And256Max128Quarters) {
+    uint256_t a, b,c;
+
+    a = dap_chain_balance_scan(MAX128STR);                                             //0b11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+    b = dap_chain_balance_scan("340282366841710300967557013907638845440");             //0b11111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000
+    c = b;                                                                                       //0b11111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000
+
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(c));
+}
+
+TEST(BitTests, And256Max128Halves) {
+    uint256_t a, b,c;
+    a = dap_chain_balance_scan(MAX128STR);                                             //0b11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+    b = dap_chain_balance_scan("340282366920938463444927863358058659840");              //0b11111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000
+    c = b;
+
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(c));
+}
+
+//TODO: add other tests, like diff halves
+
+TEST(BitTests, And256Max256Zebra) {
+    uint256_t a, b,c;
+    a = dap_chain_balance_scan(MAX256STR);                                             //0b1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+    b = dap_chain_balance_scan("77194726158210796949047323339125271902179989777093709359638389338608753093290");             //0b10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
+    c = b;                                                                                      //0b10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
+
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(c));
+}
+
+TEST(BitTests, And256Max256Octets) {
+    uint256_t a, b,c;
+
+    a = dap_chain_balance_scan(MAX256STR);                                             //0b1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+    b = dap_chain_balance_scan("115792089210356248762697446947946071893095522863849111501270640965525260206080");             //0b1111111111111111111111111111111100000000000000000000000000000000111111111111111111111111111111110000000000000000000000000000000011111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000
+    c = b;                                                                                       //0b1111111111111111111111111111111100000000000000000000000000000000111111111111111111111111111111110000000000000000000000000000000011111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000
+
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(c));
+}
+
+TEST(BitTests, And256Max256Quarters) {
+    uint256_t a, b,c;
+
+    a = dap_chain_balance_scan(MAX256STR);                                             //0b1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+    b = dap_chain_balance_scan("115792089237316195417293883273301227089774477609353836086800156426807153786880");              //0b1111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000
+    c = b;
+
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(c));
+}
+
+//TODO: add other tests, like halves and diff halves
+
+TEST(BitTests, Or256) {
+    uint256_t a = uint256_0;
+    uint256_t b = uint256_1;
+    uint256_t c;
+
+
+    //todo: should we use ASSERT_EQ with lo and hi? It would be bad for 32-bit only systems
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), dap_chain_balance_print(uint256_1));
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, a)), dap_chain_balance_print(uint256_1));
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, a)), dap_chain_balance_print(uint256_0));
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, b)), dap_chain_balance_print(uint256_1));
+
+    a = dap_chain_balance_scan(MAX64STR);               //0b1111111111111111111111111111111111111111111111111111111111111111
+    b = dap_chain_balance_scan("12297829382473034410"); //0b1010101010101010101010101010101010101010101010101010101010101010
+    c = a; //0b1111111111111111111111111111111111111111111111111111111111111111
+
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, a)), dap_chain_balance_print(c));
+
+    b = dap_chain_balance_scan("18446744069414584320");             //0b1111111111111111111111111111111100000000000000000000000000000000
+    c = a;             //0b1111111111111111111111111111111111111111111111111111111111111111
+
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, a)), dap_chain_balance_print(c));
+
+    a = dap_chain_balance_scan("18446744069414584320");             //0b1111111111111111111111111111111100000000000000000000000000000000
+    b = dap_chain_balance_scan("4294967295");                       //0b0000000000000000000000000000000011111111111111111111111111111111
+    c = dap_chain_balance_scan(MAX64STR); //0b1111111111111111111111111111111111111111111111111111111111111111
+
+
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, a)), dap_chain_balance_print(c));
+
+
+    a = dap_chain_balance_scan(MAX128STR);                                             //0b11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+    b = dap_chain_balance_scan("226854911280625642308916404954512140970");             //0b10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
+    c = a;                                                                                      //0b11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, a)), dap_chain_balance_print(c));
+
+    b = dap_chain_balance_scan("340282366841710300967557013907638845440");             //0b11111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000
+    c = a;                                                                                       //0b11111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000
+
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, a)), dap_chain_balance_print(c));
+
+
+    b = dap_chain_balance_scan("340282366920938463444927863358058659840");              //0b11111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000
+    c = a;
+
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, a)), dap_chain_balance_print(c));
+
+    a = dap_chain_balance_scan(MAX256STR);                                             //0b1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+    b = dap_chain_balance_scan("77194726158210796949047323339125271902179989777093709359638389338608753093290");             //0b10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
+    c = a;                                                                                      //0b1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, a)), dap_chain_balance_print(c));
+
+    b = dap_chain_balance_scan("115792089210356248762697446947946071893095522863849111501270640965525260206080");             //0b1111111111111111111111111111111100000000000000000000000000000000111111111111111111111111111111110000000000000000000000000000000011111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000
+    c = a;                                                                                       //0b1111111111111111111111111111111100000000000000000000000000000000111111111111111111111111111111110000000000000000000000000000000011111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000
+
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, a)), dap_chain_balance_print(c));
+
+    b = dap_chain_balance_scan("115792089237316195417293883273301227089774477609353836086800156426807153786880");              //0b1111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000
+    c = a;
+
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, a)), dap_chain_balance_print(c));
+
+
+
+}
+
+TEST(BitTests, CycleShifts) {
+    bmp::uint256_t boost_a(1);
+    uint256_t a = uint256_1;
+
+    for (int i = 0; i < 256; i++) {
+        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        LEFT_SHIFT_256(a, &a, 1);
+        boost_a <<= 1;
+    }
+
+    boost_a = 2;
+    a = dap_chain_balance_scan("2");
+
+    for (int i = 0; i < 256; i++) {
+        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        LEFT_SHIFT_256(a, &a, 1);
+        boost_a <<= 1;
+    }
+
+    boost_a = 3;
+    a = dap_chain_balance_scan("3");
+
+    for (int i = 0; i < 256; i++) {
+        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        LEFT_SHIFT_256(a, &a, 1);
+        boost_a <<= 1;
+    }
+
+    boost_a = 7;
+    a = dap_chain_balance_scan("7");
+
+    for (int i = 0; i < 256; i++) {
+        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        LEFT_SHIFT_256(a, &a, 1);
+        boost_a <<= 1;
+    }
+
+    boost_a = 9;
+    a = dap_chain_balance_scan("9");
+
+    for (int i = 0; i < 256; i++) {
+        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        LEFT_SHIFT_256(a, &a, 1);
+        boost_a <<= 1;
+    }
+
+    boost_a = bmp::uint256_t(MAX256STR);
+    a = dap_chain_balance_scan(MAX256STR);
+
+    for (int i = 0; i<256; i++) {
+        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        LEFT_SHIFT_256(a, &a, 1);
+        boost_a <<= 1;
+    }
+
+    boost_a = bmp::uint256_t(MAX256STR);
+    a = dap_chain_balance_scan(MAX256STR);
+
+    for (int i = 0; i<256; i++) {
+        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        RIGHT_SHIFT_256(a, &a, 1);
+        boost_a >>= 1;
+    }
+
+    boost_a = bmp::uint256_t("57896044618658097711785492504343953926634992332820282019728792003956564819968"); //0b10...0
+    a = dap_chain_balance_scan("57896044618658097711785492504343953926634992332820282019728792003956564819968");
+
+    for (int i = 0; i<256; i++) {
+        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        RIGHT_SHIFT_256(a, &a, 1);
+        boost_a >>= 1;
+    }
+
+    boost_a = bmp::uint256_t("86844066927987146567678238756515930889952488499230423029593188005934847229952"); //0b110...0
+    a = dap_chain_balance_scan("86844066927987146567678238756515930889952488499230423029593188005934847229952");
+
+    for (int i = 0; i<256; i++) {
+        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        RIGHT_SHIFT_256(a, &a, 1);
+        boost_a >>= 1;
+    }
+}
+
+TEST_F(RandomBitTests, RandomShift) {
+    bmp::uint256_t boost_a(gen256());
+    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+
+    for (int i = 0; i<256; i++) {
+        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        RIGHT_SHIFT_256(a, &a, 1);
+        boost_a >>= 1;
+    }
+
+    boost_a = bmp::uint256_t(gen128()); //only 128 bits
+    a = dap_chain_balance_scan(boost_a.str().c_str());
+
+    for (int i = 0; i<256; i++) {
+        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        LEFT_SHIFT_256(a, &a, 1);
+        boost_a <<= 1;
+    }
+}
+
+TEST_F(RandomBitTests, RandomShiftNotOne) {
+    bmp::uint256_t boost_a(gen256());
+    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+
+    int sh = (int) gen128()%255;
+
+    LEFT_SHIFT_256(a, &a, sh);
+    boost_a <<= sh;
+
+    ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+
+    boost_a = bmp::uint256_t(gen256());
+    a = dap_chain_balance_scan(boost_a.str().c_str());
+
+    RIGHT_SHIFT_256(a, &a, sh);
+    boost_a >>= sh;
+
+    ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+}
+
+TEST_F(RandomBitTests, And) {
+    bmp::uint256_t boost_a(gen256());
+    bmp::uint256_t boost_b(gen256());
+
+    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+    uint256_t b = dap_chain_balance_scan(boost_b.str().c_str());
+
+    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), (boost_a & boost_b).str().c_str());
+}
+
+TEST_F(RandomBitTests, Or) {
+    bmp::uint256_t boost_a(gen256());
+    bmp::uint256_t boost_b(gen256());
+
+    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+    uint256_t b = dap_chain_balance_scan(boost_b.str().c_str());
+
+    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), (boost_a | boost_b).str().c_str());
+}
+
+
+TEST_F(RandomBitTests, CiclycAnd) {
+    bmp::uint256_t boost_a(gen256());
+    bmp::uint256_t boost_b(gen256());
+
+    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+    uint256_t b = dap_chain_balance_scan(boost_b.str().c_str());
+
+    for (int i = 0; i<256; i++) {
+        ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), (boost_a & boost_b).str().c_str());
+        RIGHT_SHIFT_256(a, &a, 1);
+        RIGHT_SHIFT_256(b, &b, 1);
+        boost_a >>= 1;
+        boost_b >>= 1;
+    }
+}
+
+TEST_F(RandomBitTests, CiclycOr) {
+    bmp::uint256_t boost_a(gen256());
+    bmp::uint256_t boost_b(gen256());
+
+    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+    uint256_t b = dap_chain_balance_scan(boost_b.str().c_str());
+
+    for (int i = 0; i<256; i++) {
+        ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), (boost_a | boost_b).str().c_str());
+        RIGHT_SHIFT_256(a, &a, 1);
+        RIGHT_SHIFT_256(b, &b, 1);
+        boost_a >>= 1;
+        boost_b >>= 1;
+    }
+}
+
+
+TEST(BitTests, Incr128) {
+    uint128_t a = uint128_0;
+
+    INCR_128(&a);
+
+#ifdef DAP_GLOBAL_IS_INT128
+    ASSERT_EQ(a, 1);
+#else
+    ASSERT_EQ(a.hi, 0);
+    ASSERT_EQ(a.lo, 1);
+#endif
+
+    INCR_128(&a);
+
+#ifdef DAP_GLOBAL_IS_INT128
+    ASSERT_EQ(a, 2);
+#else
+    ASSERT_EQ(a.hi, 0);
+    ASSERT_EQ(a.lo, 2);
+#endif
+
+#ifdef DAP_GLOBAL_IS_INT128
+    a = 0xffffffffffffffff;
+#else
+    a.lo = 0xffffffffffffffff;
+#endif
+
+    INCR_128(&a);
+
+#ifdef DAP_GLOBAL_IS_INT128
+    ASSERT_EQ(a, bmp::uint128_t(MIN128STR));
+#else
+    ASSERT_EQ(a.hi, 1);
+    ASSERT_EQ(a.lo, 0);
+#endif
+
+//todo: implement 128MAX, overflowing
+}
+
+TEST(BitTests, Decr128) {
+    uint128_t a = uint128_0;
+
+    DECR_128(&a);
+
+#ifdef DAP_GLOBAL_IS_INT128
+    ASSERT_EQ(a, bmp::uint128_t(MAX128STR));
+#else
+    ASSERT_EQ(a.hi, 0xffffffffffffffff);
+    ASSERT_EQ(a.lo, 0xffffffffffffffff);
+#endif
+
+    DECR_128(&a);
+
+#ifdef DAP_GLOBAL_IS_INT128
+    ASSERT_EQ(a, bmp::uint128_t(MAX128STR)-1);
+#else
+    ASSERT_EQ(a.hi, 0xffffffffffffffff);
+    ASSERT_EQ(a.lo, 0xfffffffffffffffe);
+#endif
+
+#ifdef DAP_GLOBAL_IS_INT128
+    a = 0xffffffffffffffff;
+#else
+    a.hi = 0;
+    a.lo = 0xffffffffffffffff;
+#endif
+
+    DECR_128(&a);
+
+#ifdef DAP_GLOBAL_IS_INT128
+    ASSERT_EQ(a, bmp::uint128_t(MAX64STR)-1);
+#else
+    ASSERT_EQ(a.hi, 0);
+    ASSERT_EQ(a.lo, 0xfffffffffffffffe);
+#endif
+
+//todo: implement 128MAX, overflowing
+}
+
+TEST(BitTests, Incr256One) {
+    uint256_t a = uint256_0;
+
+    INCR_256(&a);
+
+#ifdef DAP_GLOBAL_IS_INT128
+    ASSERT_EQ(a.hi, 0);
+    ASSERT_EQ(a.lo, 1);
+#else
+    ASSERT_EQ(a.lo.lo, 1);
+    ASSERT_EQ(a.lo.hi, 0);
+    ASSERT_EQ(a.hi.lo, 0);
+    ASSERT_EQ(a.hi.hi, 0);
+#endif
+
+
+}
+
+TEST(BitTests, Incr256Two) {
+    uint256_t a = uint256_1;
+
+    INCR_256(&a);
+
+#ifdef DAP_GLOBAL_IS_INT128
+    ASSERT_EQ(a.hi, 0);
+    ASSERT_EQ(a.lo, 2);
+#else
+    ASSERT_EQ(a.lo.lo, 2);
+    ASSERT_EQ(a.lo.hi, 0);
+    ASSERT_EQ(a.hi.lo, 0);
+    ASSERT_EQ(a.hi.hi, 0);
+#endif
+
+}
+
+TEST(BitTests, Incr256Max64) {
+    uint256_t a = dap_chain_balance_scan(MAX64STR);
+
+    INCR_256(&a);
+
+
+#ifdef DAP_GLOBAL_IS_INT128
+    ASSERT_EQ(a.hi, 0);
+    ASSERT_EQ(a.lo, bmp::uint128_t(MIN128STR));
+#else
+    ASSERT_EQ(a.lo.lo, 0);
+    ASSERT_EQ(a.lo.hi, 1);
+    ASSERT_EQ(a.hi.lo, 0);
+    ASSERT_EQ(a.hi.hi, 0);
+#endif
+}
+
+
+TEST(BitTests, Incr256Min128) {
+    uint256_t a = dap_chain_balance_scan(MIN128STR);
+
+    INCR_256(&a);
+
+    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(MIN128STR)+1).str().c_str());
+}
+
+TEST(BitTests, Incr256Max128) {
+    uint256_t a = dap_chain_balance_scan(MAX128STR);
+
+    INCR_256(&a);
+
+    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(MAX128STR)+1).str().c_str());
+}
+
+TEST(BitTests, Incr256Min256) {
+    uint256_t a = dap_chain_balance_scan(MIN256STR);
+
+    INCR_256(&a);
+
+    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(MIN256STR)+1).str().c_str());
+}
+
+TEST(BitTests, Incr256Max256) {
+    uint256_t a = dap_chain_balance_scan(MAX256STR);
+
+    INCR_256(&a);
+
+    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(MAX256STR)+1).str().c_str());
+}
+
+TEST(BitTests, Decr256One) {
+    uint256_t a = uint256_0;
+
+    DECR_256(&a);
+
+    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(0)-1).str().c_str());
+}
+
+TEST(BitTests, Decr256Two) {
+    uint256_t a = uint256_1;
+
+    DECR_256(&a);
+
+    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(1)-1).str().c_str());
+
+}
+
+TEST(BitTests, Decr256Max64) {
+    uint256_t a = dap_chain_balance_scan(MAX64STR);
+
+    DECR_256(&a);
+
+    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(MAX64STR)-1).str().c_str());
+}
+
+
+TEST(BitTests, Decr256Min128) {
+    uint256_t a = dap_chain_balance_scan(MIN128STR);
+
+    DECR_256(&a);
+
+    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(MIN128STR)-1).str().c_str());
+}
+
+TEST(BitTests, Decr256Max128) {
+    uint256_t a = dap_chain_balance_scan(MAX128STR);
+
+    DECR_256(&a);
+
+    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(MAX128STR)-1).str().c_str());
+}
+
+TEST(BitTests, Decr256Min256) {
+    uint256_t a = dap_chain_balance_scan(MIN256STR);
+
+    DECR_256(&a);
+
+    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(MIN256STR)-1).str().c_str());
+}
+
+TEST(BitTests, Decr256Max256) {
+    uint256_t a = dap_chain_balance_scan(MAX256STR);
+
+    DECR_256(&a);
+
+    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(MAX256STR)-1).str().c_str());
+}
+
+TEST_F(RandomBitTests, Incr256) {
+    bmp::uint256_t boost_a(gen256());
+    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+
+    boost_a++;
+    INCR_256(&a);
+
+    ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+}
+
+TEST_F(RandomBitTests, Decr256) {
+    bmp::uint256_t boost_a(gen256());
+    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+
+    boost_a--;
+    DECR_256(&a);
+
+    ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+}
+
+//Straight to 256-bit, exclude 64 and 128 for now
+//we have some old tests, try to reimplement it here
+
+TEST(LegacyTests, Math) {
+    bmp::uint256_t i,j,k,l, msb_one=0x7fffffffffffffff, lsb_one=1, max_64=(std::numeric_limits<boost::uint64_t>::max)();
+    int density_constant=40000;
+    int density_index;
+
+    uint256_t dap_test_256_one=uint256_0, dap_test_256_two=uint256_0, dap_test_256_sum=uint256_0;
+
+    int overflow_flag;
+
+    bmp::uint128_t hi_64{"0xffffffffffffffff0000000000000000"};
+    bmp::uint128_t lo_64{"0x0000000000000000ffffffffffffffff"};
+    bmp::uint128_t max_128{"0xffffffffffffffffffffffffffffffff"};
+
+    bmp::uint128_t two_64{"0x000000000000000010000000000000000"};
+
+
+
+    bmp::uint256_t boost_two_64{"0x00000000000000000000000000000000010000000000000000"};
+    bmp::uint256_t boost_two_128{"0x0000000000000000100000000000000000000000000000000"};
+    bmp::uint256_t boost_two_192{"0x1000000000000000000000000000000000000000000000000"};
+
+
+
+    bmp::uint256_t boost_test_256_one;
+    bmp::uint256_t boost_test_256_two;
+    bmp::uint256_t boost_test_256_sum;
+
+    bmp::uint256_t boost_dap_256_comparison;
+
+    bmp::uint128_t boost_dap_64_128_comparison;
+
+    int error_counter_sum=0;
+    int error_counter_prod=0;
+    int verbose_output=0;
+
+    for (density_index = 0; density_index<density_constant; density_index+=1000){
+
+        i=density_index;
+        j=2*density_index;
+        k=3*density_index;
+        l=4*density_index;
+
+        //???
+//        dap_test_256_one = dap_chain_balance_scan((i + (j << 64) + (k << 128) + (l << 192)).str().c_str());
+
+
+
+        bmp::uint256_t boost_test_256_one_coeff_2_0=i;
+        bmp::uint256_t boost_test_256_one_coeff_2_64=j;
+        bmp::uint256_t boost_test_256_one_coeff_2_128=k;
+        bmp::uint256_t boost_test_256_one_coeff_2_192=l;
+
+
+
+        boost_test_256_one=boost_test_256_one_coeff_2_0 + boost_test_256_one_coeff_2_64*boost_two_64
+                           +boost_test_256_one_coeff_2_128*boost_two_128+boost_test_256_one_coeff_2_192*boost_two_192;
+
+        dap_test_256_one = dap_chain_balance_scan(boost_test_256_one.str().c_str());
+
+        i=max_64-(density_index+1);
+        j=max_64-2*(density_index+1);
+        k=max_64-3*(density_index+1);
+        l=max_64-4*(density_index+1);
+
+
+        bmp::uint256_t boost_test_256_two_coeff_2_0=i;
+        bmp::uint256_t boost_test_256_two_coeff_2_64=j;
+        bmp::uint256_t boost_test_256_two_coeff_2_128=k;
+        bmp::uint256_t boost_test_256_two_coeff_2_192=l;
+
+
+        boost_test_256_two=boost_test_256_two_coeff_2_0 + boost_test_256_two_coeff_2_64*boost_two_64
+                           +boost_test_256_two_coeff_2_128*boost_two_128+boost_test_256_two_coeff_2_192*boost_two_192;
+
+
+        dap_test_256_two = dap_chain_balance_scan(boost_test_256_two.str().c_str());
+
+
+//        add(boost_add_256, i, j);
+        overflow_flag=SUM_256_256(dap_test_256_one,dap_test_256_two,&dap_test_256_sum);
+//        boost_test_256_sum=add(boost_test_256_sum,boost_test_256_one,boost_test_256_two);
+        boost_test_256_sum = boost_test_256_one + boost_test_256_two;
+
+        ASSERT_STREQ(dap_chain_balance_print(dap_test_256_sum), boost_test_256_sum.str().c_str());
+
+
+        }
+
+
+
+
+}
+
+TEST(LegacyTests, Uint256) {
+    uint64_t i, j, k, l, msb_one = 0x7fffffffffffffff, lsb_one = 1, max_64 = (std::numeric_limits<boost::uint64_t>::max)();
+
+//    uint64_t  i, j;
+
+    int density_constant = 200;
+    int density_index = 0;
+    int division_enabled = 0;
+
+
+
+    uint128_t dap_test_128_shift = uint128_0;
+    uint128_t dap_test_128_one = uint128_0;
+    uint128_t dap_test_128_two = uint128_0;
+    uint128_t dap_test_128_sub = uint128_0;
+    uint256_t dap_test_256_one = uint256_0;
+    uint256_t dap_test_256_two = uint256_0;
+    uint256_t dap_test_256_sum = uint256_0;
+    uint256_t dap_test_256_sub = uint256_0;
+    uint256_t dap_test_256_prod = uint256_0;
+    uint256_t dap_test_256_shift = uint256_0;
+    uint512_t dap_test_512_prod = uint512_0;
+
+    int overflow_flag;
+    int overflow_flag_prod;
+    int borrow_flag_128;
+    int borrow_flag_256;
+    int testing_mode = 0;
+
+
+    boost::multiprecision::uint128_t hi_64{"0xffffffffffffffff0000000000000000"};
+    boost::multiprecision::uint128_t lo_64{"0x0000000000000000ffffffffffffffff"};
+    boost::multiprecision::uint128_t max_128{"0xffffffffffffffffffffffffffffffff"};
+    boost::multiprecision::uint128_t two_64{"0x000000000000000010000000000000000"};
+
+    boost::multiprecision::uint256_t boost_two_64{"0x00000000000000000000000000000000010000000000000000"};
+    boost::multiprecision::uint256_t boost_two_128{"0x0000000000000000100000000000000000000000000000000"};
+    boost::multiprecision::uint256_t boost_two_192{"0x1000000000000000000000000000000000000000000000000"};
+
+    boost::multiprecision::uint512_t boost_two_64_for_512_calc{"0x00000000000000000000000000000000010000000000000000"};
+    boost::multiprecision::uint512_t boost_two_128_for_512_calc{"0x0000000000000000100000000000000000000000000000000"};
+    boost::multiprecision::uint512_t boost_two_192_for_512_calc{"0x1000000000000000000000000000000000000000000000000"};
+    boost::multiprecision::uint512_t boost_two_256_for_512_calc{"0x000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000"};
+
+    boost::multiprecision::uint512_t boost_two_320_for_512_calc{"0x100000000000000000000000000000000000000000000000000000000000000000000000000000000"};
+    boost::multiprecision::uint512_t boost_two_384_for_512_calc{"0x1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"};
+    boost::multiprecision::uint512_t boost_two_448_for_512_calc{"0x10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"};
+
+    boost::multiprecision::uint128_t boost_two_64_for_128_calc{"0x000000000000000010000000000000000"};
+
+
+
+
+    boost::multiprecision::uint256_t boost_test_256_one{"0x0000000000000000000000000000000000000000000000000"};
+    boost::multiprecision::uint256_t boost_test_256_two{"0x0000000000000000000000000000000000000000000000000"};
+    boost::multiprecision::uint256_t boost_test_256_sum{"0x0000000000000000000000000000000000000000000000000"};
+    boost::multiprecision::uint256_t boost_test_256_sub{"0x0000000000000000000000000000000000000000000000000"};
+    boost::multiprecision::uint256_t boost_test_256_prod{"0x0000000000000000000000000000000000000000000000000"};
+    boost::multiprecision::uint256_t boost_test_512_prod_hi_prod{"0x0000000000000000000000000000000000000000000000000"};
+    boost::multiprecision::uint256_t boost_test_512_prod_lo_prod{"0x0000000000000000000000000000000000000000000000000"};
+
+
+    boost::multiprecision::uint512_t boost_test_2_256_quotient{"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"};
+    boost::multiprecision::uint512_t boost_test_2_256_remainder{"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"};
+    boost::multiprecision::uint512_t boost_test_512_prod{"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"};
+
+    boost::multiprecision::uint128_t boost_test_128_one{"0x000000000000000000000000000000000"};
+    boost::multiprecision::uint128_t boost_test_128_two{"0x000000000000000000000000000000000"};
+    boost::multiprecision::uint128_t boost_test_128_sub{"0x000000000000000000000000000000000"};
+    boost::multiprecision::uint128_t boost_test_256_one_lo{"0x000000000000000000000000000000000"};
+    boost::multiprecision::uint128_t boost_test_256_one_hi{"0x000000000000000000000000000000000"};
+    boost::multiprecision::uint128_t boost_test_256_two_lo{"0x000000000000000000000000000000000"};
+    boost::multiprecision::uint128_t boost_test_256_two_hi{"0x000000000000000000000000000000000"};
+    boost::multiprecision::uint128_t boost_dap_64_128_comparison{"0x000000000000000000000000000000000"};
+    boost::multiprecision::uint128_t boost_test_shift_left_128{"0x000000000000000000000000000000000"};
+    boost::multiprecision::uint128_t boost_test_shift_left_128_quotient_limb{"0x000000000000000000000000000000000"};
+    boost::multiprecision::uint128_t boost_test_shift_left_128_remainder_limb{"0x000000000000000000000000000000000"};
+    boost::multiprecision::uint128_t boost_dap_comparison_shift_left_128{"0x000000000000000000000000000000000"};
+    boost::multiprecision::uint128_t boost_test_64_128_prod{"0x000000000000000000000000000000000"};
+    boost::multiprecision::uint128_t boost_dap_128_prod_comparison{"0x000000000000000000000000000000000"};
+    boost::multiprecision::uint128_t boost_dap_128_comparison_sub{"0x000000000000000000000000000000000"};
+
+    boost::multiprecision::uint256_t boost_dap_256_comparison{"0x0000000000000000000000000000000000000000000000000"};
+    boost::multiprecision::uint256_t boost_dap_256_comparison_sub{"0x0000000000000000000000000000000000000000000000000"};
+    boost::multiprecision::uint256_t boost_dap_256_comparison_prod{"0x0000000000000000000000000000000000000000000000000"};
+    boost::multiprecision::uint256_t boost_test_shift_left_256{"0x0000000000000000000000000000000000000000000000000"};
+    boost::multiprecision::uint256_t boost_dap_comparison_shift_left_256{"0x0000000000000000000000000000000000000000000000000"};
+
+    boost::multiprecision::uint512_t boost_dap_512_comparison_prod{"0x0"};
+
+    int error_counter_sum=0;
+    int error_counter_prod=0;
+    int error_counter_sub_128=0;
+    int error_counter_sub_256=0;
+    int error_counter_prod_128_128=0;
+    int error_counter_prod_128_256=0;
+    int error_counter_prod_256_256=0;
+    int error_counter_prod_256_512=0;
+    int error_counter_shift_left_128=0;
+    int error_counter_shift_left_256=0;
+    int error_counter_quot_128=0;
+
+
+    for (density_index = 0; density_index < density_constant; density_index += 1) {
+        /////////////////////output of 256+256-->256//////////////////////
+
+        i=density_index;
+        j=2*density_index;
+        k=3*density_index;
+        l=4*density_index;
+
+
+
+
+        boost::multiprecision::uint256_t boost_test_256_one_coeff_2_0=i;
+        boost::multiprecision::uint256_t boost_test_256_one_coeff_2_64=j;
+        boost::multiprecision::uint256_t boost_test_256_one_coeff_2_128=k;
+        boost::multiprecision::uint256_t boost_test_256_one_coeff_2_192=l;
+
+
+
+        boost_test_256_one=boost_test_256_one_coeff_2_0 + boost_test_256_one_coeff_2_64*boost_two_64
+                           +boost_test_256_one_coeff_2_128*boost_two_128+boost_test_256_one_coeff_2_192*boost_two_192;
+
+        dap_test_256_one = dap_chain_balance_scan(boost_test_256_one.str().c_str());
+//        boost_test_256_one_hi=boost_test_256_one_coeff_2_128+boost_two_64*boost_test_256_one_coeff_2_192;
+//        boost_test_256_one_lo=boost_test_256_one_coeff_2_0+boost_test_256_one_coeff_2_64*boost_two_64;
+
+        i=max_64-(density_index+1);
+        j=max_64-2*(density_index+1);
+        k=max_64-3*(density_index+1);
+        l=max_64-4*(density_index+1);
+
+
+
+        boost::multiprecision::uint256_t boost_test_256_two_coeff_2_0=i;
+        boost::multiprecision::uint256_t boost_test_256_two_coeff_2_64=j;
+        boost::multiprecision::uint256_t boost_test_256_two_coeff_2_128=k;
+        boost::multiprecision::uint256_t boost_test_256_two_coeff_2_192=l;
+
+
+        boost_test_256_two=boost_test_256_two_coeff_2_0 + boost_test_256_two_coeff_2_64*boost_two_64
+                           +boost_test_256_two_coeff_2_128*boost_two_128+boost_test_256_two_coeff_2_192*boost_two_192;
+
+        dap_test_256_two = dap_chain_balance_scan(boost_test_256_two.str().c_str());
+        overflow_flag=SUM_256_256(dap_test_256_one,dap_test_256_two,&dap_test_256_sum);
+        boost_test_256_sum = boost_test_256_one + boost_test_256_two;
+
+        ASSERT_STREQ(dap_chain_balance_print(dap_test_256_sum), boost_test_256_sum.str().c_str()) << "incorrect output for density index=" << density_index;
+
+
+
+        ///256 bit subtraction
+
+        borrow_flag_256=SUBTRACT_256_256(dap_test_256_two,dap_test_256_one,&dap_test_256_sub);
+        boost_test_256_sub = boost_test_256_two - boost_test_256_one;
+
+        ASSERT_STREQ(dap_chain_balance_print(dap_test_256_sub), boost_test_256_sub.str().c_str()) << "incorrect output for density index=" << density_index;
+
+
+        /////////////////////output of 256*256-->256//////////////////////
+
+        overflow_flag_prod=MULT_256_256(dap_test_256_one,dap_test_256_two,&dap_test_256_prod);
+
+        boost_test_256_prod = (boost_test_256_one * boost_test_256_two);
+
+        ASSERT_STREQ(dap_chain_balance_print(dap_test_256_prod), boost_test_256_prod.str().c_str()) << "incorrect output for density index=" << density_index;
+
+
+//        multiply(boost_test_256_prod,boost_test_256_one,boost_test_256_two);
+//        multiply(boost_test_512_prod,boost_test_256_one,boost_test_256_two);
+////        multiply(boost_test_512_prod_hi_prod,boost_test_256_one_hi,boost_test_256_two_hi);
+////        multiply(boost_test_512_prod_lo_prod,boost_test_256_one_lo,boost_test_256_two_lo);
+//        divide_qr(boost_test_512_prod,boost_two_256_for_512_calc,boost_test_2_256_quotient,boost_test_2_256_remainder);
+//
+//        boost_dap_256_comparison_prod=dap_test_256_prod.lo.lo+dap_test_256_prod.lo.hi*boost_two_64+
+//                                      dap_test_256_prod.hi.lo*boost_two_128+dap_test_256_prod.hi.hi*boost_two_192;
+
+
+        /////////////////////output of 256*256-->512//////////////////////
+        dap_test_512_prod = uint512_0;
+
+        uint256_t intermed_lo_prod;
+        uint256_t intermed_hi_prod;
+
+        MULT_256_512(dap_test_256_one,dap_test_256_two,&dap_test_512_prod);
+
+
+        boost_dap_512_comparison_prod = boost_test_256_one * boost_test_256_two;
+
+        char buf[512] = {0};
+
+        //todo: Implement comparition for 512
+
+
+        /////////////////////output of shift left 128/////////////////////
+
+        if (density_index<=127){
+#ifdef DAP_GLOBAL_IS_INT128
+            dap_test_128_one=dap_test_256_one.lo;
+            LEFT_SHIFT_128(dap_test_128_one,&dap_test_128_shift,density_index);
+
+
+
+            boost_test_128_one=dap_test_128_one+dap_test_128_one*boost_two_64_for_128_calc;
+            boost_test_shift_left_128=boost_test_128_one<<density_index;
+            boost_dap_comparison_shift_left_128=dap_test_128_shift+dap_test_128_shift*boost_two_64_for_128_calc;
+
+            divide_qr(boost_test_shift_left_128,boost_two_64_for_128_calc,boost_test_shift_left_128_quotient_limb,boost_test_shift_left_128_remainder_limb);
+
+            ASSERT_EQ(boost_dap_comparison_shift_left_128, boost_test_shift_left_128) << "incorrect shift left 128 output for density index=" << density_index;
+
+#else
+            //todo: not implemented
+#endif
+        }
+        /////////////////////output of shift left 256/////////////////////
+
+        if (density_index<=255){
+#ifdef DAP_GLOBAL_IS_INT128
+            LEFT_SHIFT_256(dap_test_256_one,&dap_test_256_shift,density_index);
+
+            boost_test_256_one=boost_test_256_one_coeff_2_0 + boost_test_256_one_coeff_2_64*boost_two_64
+                               +boost_test_256_one_coeff_2_128*boost_two_128+boost_test_256_one_coeff_2_192*boost_two_192;
+            boost_test_shift_left_256=boost_test_256_one<<density_index;
+            boost_dap_comparison_shift_left_256=dap_test_256_shift.lo+
+                                                dap_test_256_shift.hi*boost_two_128;
+
+            ASSERT_EQ(boost_dap_comparison_shift_left_256, boost_test_shift_left_256) << "incorrect shift left 128 output for density index=" << density_index;
+#else
+            //todo: not implemented
+#endif
+        }
+
+        /////////////////////output of 64*64-->128////////////////////////
+
+
+        i=density_index;
+        j=max_64-(density_index+1);
+        uint128_t dap_test_64_128_prod;
+#ifdef DAP_GLOBAL_IS_INT128
+        dap_test_64_128_prod=0;
+#else
+        dap_test_64_128_prod.lo=0;
+        dap_test_64_128_prod.hi=0;
+#endif
+
+
+
+        boost_test_64_128_prod = bmp::uint128_t(i) * bmp::uint128_t(j);
+
+
+        MULT_64_128(i,j,&dap_test_64_128_prod);
+#ifdef DAP_GLOBAL_IS_INT128
+        boost_dap_128_prod_comparison=dap_test_64_128_prod;
+#else
+        boost_dap_128_prod_comparison = 0;
+        boost_dap_128_prod_comparison += dap_test_64_128_prod.hi;
+        boost_dap_128_prod_comparison <<= 64;
+        boost_dap_128_prod_comparison += dap_test_64_128_prod.lo;
+#endif
+
+        ASSERT_EQ(boost_dap_128_prod_comparison, boost_test_64_128_prod);
+
+
+        ///////////////////output of 128*128-->128////////////////////////
+
+        uint128_t dap_test_128_128_prod_one;
+        uint128_t dap_test_128_128_prod_two;
+        uint128_t dap_test_128_128_prod_prod;
+
+//        dap_test_128_128_prod_one = i + ((uint128_t) j << 64);
+//        dap_test_128_128_prod_two = max_64-(i+1) + (((uint128_t) max_64 - (i+1) +  max_64-2*(j+1)) << 64);
+//        dap_test_128_128_prod_prod = uint128_0;
+
+
+
+        boost::multiprecision::uint128_t boost_test_128_128_prod;
+        boost::multiprecision::uint128_t boost_test_128_128_one;
+        boost::multiprecision::uint128_t boost_test_128_128_two;
+        boost::multiprecision::uint128_t boost_dap_128_128_prod_comparison;
+
+        ////compute boost "factors"
+        boost_test_128_128_one=i+j*boost_two_64_for_128_calc;
+        boost_test_128_128_two=max_64-(i+1)+(max_64-2*(j+1))*boost_two_64_for_128_calc;
+
+        dap_test_128_128_prod_one = dap_chain_balance_scan(boost_test_128_128_one.str().c_str()).lo;
+        dap_test_128_128_prod_two = dap_chain_balance_scan(boost_test_128_128_two.str().c_str()).lo;
+
+
+        multiply(boost_test_128_128_prod, boost_test_128_128_one, boost_test_128_128_two);
+        MULT_128_128(dap_test_128_128_prod_one,dap_test_128_128_prod_two,&dap_test_128_128_prod_prod);
+
+#ifdef DAP_GLOBAL_IS_INT128
+        boost_dap_128_128_prod_comparison=dap_test_128_128_prod_prod;
+#else
+        boost_dap_128_128_prod_comparison = 0;
+        boost_dap_128_128_prod_comparison += dap_test_128_128_prod_prod.hi;
+        boost_dap_128_128_prod_comparison <<= 64;
+        boost_dap_128_128_prod_comparison += dap_test_128_128_prod_prod.lo;
+#endif
+
+        ASSERT_EQ(
+                boost_dap_128_128_prod_comparison, boost_test_128_128_prod
+                ) << boost_test_128_128_one << " * " << boost_test_128_128_two;
+
+
+        ///128 bit subtraction
+
+        dap_test_128_one = dap_chain_balance_scan(boost_test_128_one.str().c_str()).lo;
+        dap_test_128_two = dap_chain_balance_scan(boost_test_128_two.str().c_str()).lo;
+
+        borrow_flag_128=SUBTRACT_128_128(dap_test_128_one,dap_test_128_two,&dap_test_128_sub);
+        subtract(boost_test_128_sub,boost_test_128_one,boost_test_128_two);
+
+
+#ifdef DAP_GLOBAL_IS_INT128
+        boost_dap_128_comparison_sub=dap_test_128_sub;
+#else
+        boost_dap_128_comparison_sub = 0;
+        boost_dap_128_comparison_sub += dap_test_128_sub.hi;
+        boost_dap_128_comparison_sub <<= 64;
+        boost_dap_128_comparison_sub += dap_test_128_sub.lo;
+#endif
+
+        ASSERT_EQ(
+                boost_dap_128_comparison_sub, boost_test_128_sub
+        ) << boost_test_128_one << " - " << boost_test_128_two;
+
+
+
+
+
+
+
+
+
+        /////////////////////output of 128*128-->256////////////////////////
+
+
+        uint128_t dap_test_128_256_prod_one;
+        uint128_t dap_test_128_256_prod_two;
+        uint256_t dap_test_128_256_prod_prod;
+//        dap_test_128_256_prod_one.lo=i;
+//        dap_test_128_256_prod_one.hi=j;
+//        dap_test_128_256_prod_two.lo=max_64-(i+1);
+//        dap_test_128_256_prod_two.hi=max_64-2*(j+1);
+//        dap_test_128_256_prod_prod.lo=zero_128;
+//        dap_test_128_256_prod_prod.hi=zero_128;
+
+        boost::multiprecision::uint256_t boost_test_128_256_prod;
+        boost::multiprecision::uint128_t boost_test_128_256_one;
+        boost::multiprecision::uint128_t boost_test_128_256_two;
+        boost::multiprecision::uint256_t boost_dap_128_256_prod_comparison;
+
+        ////compute boost "factors"
+        boost_test_128_256_one=i+j*boost_two_64_for_128_calc;
+        boost_test_128_256_two=(max_64-(i+1))+(max_64-2*(j+1))*boost_two_64_for_128_calc;
+
+        dap_test_128_256_prod_one = dap_chain_balance_scan(boost_test_128_256_one.str().c_str()).lo;
+        dap_test_128_256_prod_two = dap_chain_balance_scan(boost_test_128_256_two.str().c_str()).lo;
+
+        multiply(boost_test_128_256_prod, boost_test_128_256_one, boost_test_128_256_two);
+        MULT_128_256(dap_test_128_256_prod_one,dap_test_128_256_prod_two,&dap_test_128_256_prod_prod);
+
+        ASSERT_EQ(bmp::uint256_t(dap_chain_balance_print(dap_test_128_256_prod_prod)), boost_test_128_256_prod) << boost_test_128_256_one << " * " << boost_test_128_256_two;
+
+
+
+    // todo: uncomment this when divmod_impl_128 will be implemented without ifdef
+//        /////////////////////output of 128/128-->128////////////////////////
+//        if(division_enabled==1){
+//
+//            i=density_index+1;
+//            j=density_index+2;
+//            uint128_t dap_test_128_quot_one;
+//            uint128_t dap_test_128_quot_two;
+//            uint128_t dap_test_128_quot_quot;
+//            uint128_t dap_test_128_quot_rem;
+//
+//
+//            boost::multiprecision::uint128_t boost_test_128_quot_one;
+//            boost::multiprecision::uint128_t boost_test_128_quot_two;
+//            boost::multiprecision::uint128_t boost_test_128_quot_quot;
+//            boost::multiprecision::uint128_t boost_test_128_quot_rem;
+//            boost::multiprecision::uint128_t boost_dap_128_quot_comparison_quot;
+//            boost::multiprecision::uint128_t boost_dap_128_quot_comparison_rem;
+//
+//            ////compute boost "factors"
+//            boost_test_128_quot_one=i+j*boost_two_64_for_128_calc;
+//            boost_test_128_quot_two=(max_64-(i+1))+(max_64-2*(j+1))*boost_two_64_for_128_calc;
+//
+//            dap_test_128_quot_one = dap_chain_balance_scan(boost_test_128_quot_one.str().c_str()).lo;
+//            dap_test_128_quot_two = dap_chain_balance_scan(boost_test_128_quot_two.str().c_str()).lo;
+//
+//            divide_qr( boost_test_128_quot_two, boost_test_128_quot_one,boost_test_128_quot_quot,boost_test_128_quot_rem);
+//            divmod_impl_128(dap_test_128_quot_one,dap_test_128_quot_two,&dap_test_128_quot_quot, &dap_test_128_quot_rem);
+//
+//
+//            ASSERT_EQ(bmp::uint256_t(dap_test_128_quot_quot), boost_test_128_quot_quot) << boost_test_128_quot_two << " / " << boost_test_128_quot_one;
+//            ASSERT_EQ(bmp::uint256_t(dap_test_128_quot_rem), boost_test_128_quot_rem) << boost_test_128_quot_two << " % " << boost_test_128_quot_one;
+//
+//
+//        }
+
+
+    }
+}
+
+
+TEST(MathTests, Sum256Zeroes) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "0";
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUM_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+
+    SUM_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Sum256OneZero) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "1";
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUM_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+
+    SUM_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Sum256OneOne) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "1";
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUM_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+
+    SUM_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Sum256Min128Zero) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN128STR;
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUM_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+
+    SUM_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Sum256Min128One) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN128STR;
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUM_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+
+    SUM_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Sum256Min128Two) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN128STR;
+    string rhs = "2";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUM_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+
+    SUM_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Sum256Max128Zero) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MAX128STR;
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUM_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+
+    SUM_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Sum256Max128One) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MAX128STR;
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUM_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+
+    SUM_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Sum256Max128Two) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MAX128STR;
+    string rhs = "2";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUM_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+
+    SUM_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Sum256Min256Zero) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN256STR;
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUM_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+
+    SUM_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Sum256Min256One) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN256STR;
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUM_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+
+    SUM_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Sum256Min256Two) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN256STR;
+    string rhs = "2";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUM_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+
+    SUM_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Sum256Max256Zero) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MAX256STR;
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUM_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+
+    SUM_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Sum256Max256One) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MAX256STR;
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUM_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+
+    SUM_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST_F(RandomMathTests, Sum256) {
+    bmp::uint256_t boost_a(gen256()), boost_b(gen256());
+
+    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+    uint256_t b = dap_chain_balance_scan(boost_b.str().c_str());
+    uint256_t c = uint256_0;
+
+    SUM_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (boost_a+boost_b).str().c_str());
+
+    SUM_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (boost_b+boost_a).str().c_str());
+}
+
+/// SUBTRACTION
+
+TEST(MathTests, Sub256Zeroes) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "0";
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+
+    SUBTRACT_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) - bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256OneZero) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "1";
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256ZeroOne) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "0";
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256OneOne) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "1";
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256Min128Zero) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN128STR;
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256ZeroMin128) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "0";
+    string rhs = MIN128STR;
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256Min128One) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN128STR;
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256OneMin128) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "1";
+    string rhs = MIN128STR;
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256Min128Two) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN128STR;
+    string rhs = "2";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256TwoMin128) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "2";
+    string rhs = MIN128STR;
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256Max128Zero) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MAX128STR;
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256ZeroMax128) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "0";
+    string rhs = MAX128STR;
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256Max128One) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MAX128STR;
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256OneMax128) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "1";
+    string rhs = MAX128STR;
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256Max128Two) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MAX128STR;
+    string rhs = "2";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256TwoMax128) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "2";
+    string rhs = MAX128STR;
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256Min256Zero) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN256STR;
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256ZeroMin256) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "0";
+    string rhs = MIN256STR;
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256Min256One) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN256STR;
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+
+}
+
+TEST(MathTests, Sub256OneMin256) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "1";
+    string rhs = MIN256STR;
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256Min256Two) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN256STR;
+    string rhs = "2";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256TwoMin256) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "2";
+    string rhs = MIN256STR;
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256Max256Zero) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MAX256STR;
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256ZeroMax256) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "0";
+    string rhs = MAX256STR;
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256Max256One) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MAX256STR;
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Sub256OneMax256) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "1";
+    string rhs = MAX256STR;
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST_F(RandomMathTests, Sub256) {
+    bmp::uint256_t boost_a(gen256()), boost_b(gen256());
+
+    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+    uint256_t b = dap_chain_balance_scan(boost_b.str().c_str());
+    uint256_t c = uint256_0;
+
+    SUBTRACT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (boost_a-boost_b).str().c_str());
+}
+
+
+//// PRODUCTION
+TEST(MathTests, Prod256Zeroes) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "0";
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    MULT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+
+    MULT_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Prod256OneZero) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "0";
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    MULT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+
+    MULT_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Prod256OneOne) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "1";
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    MULT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+
+    MULT_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Prod256Min128Zero) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN128STR;
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    MULT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+
+    MULT_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Prod256Min128One) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN128STR;
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    MULT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+
+    MULT_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Prod256Min128Two) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN128STR;
+    string rhs = "2";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    MULT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+
+    MULT_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Prod256Max128Zero) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MAX128STR;
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    MULT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+
+    MULT_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Prod256Max128One) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MAX128STR;
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    MULT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+
+    MULT_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Prod256Max128Two) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MAX128STR;
+    string rhs = "2";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    MULT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+
+    MULT_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Prod256Min256Zero) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN256STR;
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    MULT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+
+    MULT_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Prod256Min256One) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN256STR;
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    MULT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+
+    MULT_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Prod256Min256Two) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN256STR;
+    string rhs = "2";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    MULT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+
+    MULT_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Prod256Max256Zero) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MAX256STR;
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    MULT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+
+    MULT_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Prod256Max256One) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MAX256STR;
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    MULT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+
+    MULT_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST_F(RandomMathTests, Prod256) {
+    bmp::uint256_t boost_a(gen256()), boost_b(gen256());
+
+    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+    uint256_t b = dap_chain_balance_scan(boost_b.str().c_str());
+    uint256_t c = uint256_0;
+
+    MULT_256_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (boost_a*boost_b).str().c_str());
+
+    MULT_256_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (boost_b*boost_a).str().c_str());
+}
+
+
+//// DIVISION
+//division by zero disabled for now
+
+TEST(DISABLED_MathTests, Div256Zeroes) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "0";
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+
+    DIV_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) / bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(DISABLED_MathTests, Div256OneZero) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "1";
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Div256ZeroOne) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "0";
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Div256OneOne) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "1";
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(DISABLED_MathTests, Div256Min128Zero) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN128STR;
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Div256ZeroMin128) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "0";
+    string rhs = MIN128STR;
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Div256Min128One) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN128STR;
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Div256OneMin128) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "1";
+    string rhs = MIN128STR;
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Div256Min128Two) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN128STR;
+    string rhs = "2";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Div256TwoMin128) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "2";
+    string rhs = MIN128STR;
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(DISABLED_MathTests, Div256Max128Zero) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MAX128STR;
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Div256ZeroMax128) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MAX128STR;
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(b, a, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) / bmp::uint256_t(lhs)).str().c_str());
+}
+
+TEST(MathTests, Div256Max128One) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MAX128STR;
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Div256OneMax128) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "1";
+    string rhs = MAX128STR;
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Div256Max128Two) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MAX128STR;
+    string rhs = "2";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Div256TwoMax128) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "2";
+    string rhs = MAX128STR;
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(DISABLED_MathTests, Div256Min256Zero) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN256STR;
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Div256ZeroMin256) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "0";
+    string rhs = MIN256STR;
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Div256Min256One) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN256STR;
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+
+}
+
+TEST(MathTests, Div256OneMin256) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "1";
+    string rhs = MIN256STR;
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Div256Min256Two) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MIN256STR;
+    string rhs = "2";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Div256TwoMin256) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "2";
+    string rhs = MIN256STR;
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(DISABLED_MathTests, Div256Max256Zero) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MAX256STR;
+    string rhs = "0";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Div256ZeroMax256) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "0";
+    string rhs = MAX256STR;
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Div256Max256One) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = MAX256STR;
+    string rhs = "1";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, Div256OneMax256) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "1";
+    string rhs = MAX256STR;
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+}
+
+TEST(MathTests, DivMoreToLess) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "25000";
+    string rhs = "10000";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+    DIV_256_COIN(a, b, &c);
+    ASSERT_STREQ(dap_chain_balance_to_coins(c), "2.5");
+}
+
+TEST(MathTests, DivMoreToLessPrimes) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "23";
+    string rhs = "13";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+    DIV_256_COIN(a, b, &c);
+    ASSERT_STREQ(dap_chain_balance_to_coins(c), "1.76923076923076923");
+}
+
+TEST(MathTests, DivMoreToLessClassic) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "2500";
+    string rhs = "1000";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+    DIV_256_COIN(a, b, &c);
+    ASSERT_STREQ(dap_chain_balance_to_coins(c), "2.5");
+}
+
+TEST(MathTests, DivMoreToLessSixFour) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "6";
+    string rhs = "4";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+    DIV_256_COIN(a, b, &c);
+    ASSERT_STREQ(dap_chain_balance_to_coins(c), "1.5");
+}
+
+TEST(MathTests, DivMoreToLessSixThree) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "6";
+    string rhs = "3";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+    DIV_256_COIN(a, b, &c);
+    ASSERT_STREQ(dap_chain_balance_to_coins(c), "2.0");
+}
+
+TEST(MathTests, DivMoreToLessBigBig) {
+    uint256_t a, b, c = uint256_0;
+
+    string lhs = "1.0e+57";
+    string rhs = "1.0e+23";
+
+    a = dap_chain_balance_scan(lhs.c_str());
+    b = dap_chain_balance_scan(rhs.c_str());
+    DIV_256_COIN(a, b, &c);
+    ASSERT_STREQ(dap_chain_balance_to_coins(c), "10000000000000000000000000000000000.0");
+}
+
+
+TEST_F(RandomMathTests, Div256) {
+    bmp::uint256_t boost_a(gen256()), boost_b(gen256());
+
+    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+    uint256_t b = dap_chain_balance_scan(boost_b.str().c_str());
+    uint256_t c = uint256_0;
+
+    if (boost_b == 0) {
+        GTEST_SKIP() << "Division by zero";
+    }
+
+    DIV_256(a, b, &c);
+
+    ASSERT_STREQ(dap_chain_balance_print(c), (boost_a/boost_b).str().c_str());
+}
+
diff --git a/core/test/uint256_t/CMakeLists.txt b/core/test/uint256_t/CMakeLists.txt
new file mode 100644
index 000000000..f4d14b331
--- /dev/null
+++ b/core/test/uint256_t/CMakeLists.txt
@@ -0,0 +1,52 @@
+cmake_minimum_required(VERSION 3.10)
+project(256_tests C CXX)
+
+set(CMAKE_C_STANDARD 11)
+
+# GoogleTest requires at least C++14
+set(CMAKE_CXX_STANDARD 14)
+ 
+ 
+include_directories(../modules/common/include)
+include_directories(../dap-sdk/core/include)
+ 
+ 
+set(BOOST_REQUESTED_VERSION 1.65)
+ 
+if (NOT Boost_INCLUDE_DIR)
+        FIND_PACKAGE( Boost COMPONENTS system program_options REQUIRED )
+endif()
+ 
+INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
+ 
+include(FetchContent)
+FetchContent_Declare(
+        googletest
+        GIT_REPOSITORY https://github.com/google/googletest.git
+        GIT_TAG main
+)
+# For Windows: Prevent overriding the parent project's compiler/linker settings
+set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
+FetchContent_MakeAvailable(googletest)
+enable_testing()
+add_executable(
+	${PROJECT_NAME}
+        256_tests.cc
+)
+target_link_libraries(
+	${PROJECT_NAME}
+        GTest::gtest_main
+        GTest::gtest
+        ${Boost_LIBRARIES}
+        m
+        dap_core
+)
+target_include_directories(
+	${PROJECT_NAME}
+        INTERFACE
+        ../
+)
+
+include(GoogleTest)
+gtest_discover_tests(${PROJECT_NAME})
+
-- 
GitLab


From 9bed3aed193526fb4587a4a1030309d324b80b5c Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Tue, 31 Oct 2023 19:04:30 +0700
Subject: [PATCH 11/21] [*] Moved the function for converting the value of an
 unsigned integer and a fixed-point number to uint256_t into a separate file.
 Added necessary definitions.

---
 core/include/dap_math_convert.h | 211 ++++++++++++++++++++++
 core/include/dap_math_ops.h     | 298 --------------------------------
 core/src/dap_math_convert.c     | 269 ++++++++++++++++++++++++++++
 3 files changed, 480 insertions(+), 298 deletions(-)
 create mode 100644 core/include/dap_math_convert.h
 create mode 100644 core/src/dap_math_convert.c

diff --git a/core/include/dap_math_convert.h b/core/include/dap_math_convert.h
new file mode 100644
index 000000000..8e9e9aa50
--- /dev/null
+++ b/core/include/dap_math_convert.h
@@ -0,0 +1,211 @@
+#pragma once
+#include "dap_math_ops.h"
+
+#define DATOSHI_DEGREE 18
+#define DATOSHI_POW 39
+#define DATOSHI_POW256 (DATOSHI_POW * 2)
+#define DAP_CHAIN$SZ_MAX128DEC DATOSHI_POW                                          /* "340282366920938463463374607431768211455" */
+#define DAP_CHAIN$SZ_MAX256DEC DATOSHI_POW256                                       /* 2 ^ 256 = 1.15792089237316195423570985008687907853269984665640564039457584007913129639935e77*/
+#define DAP_SZ_MAX256SCINOT (DATOSHI_POW256 + 5)
+
+static const union __c_pow10_double__ {
+    uint64_t u64[4];
+    uint32_t u32[8];
+} DAP_ALIGN_PACKED c_pow10_double[DATOSHI_POW256] = {
+#ifdef DAP_GLOBAL_IS_INT128
+        { .u64 = {0,                            0,                           0,                         1ULL} },                          // 0
+        { .u64 = {0,                            0,                           0,                         10ULL} },                         // 1
+        { .u64 = {0,                            0,                           0,                         100ULL} },                        // 2
+        { .u64 = {0,                            0,                           0,                         1000ULL} },                       // 3
+        { .u64 = {0,                            0,                           0,                         10000ULL} },                      // 4
+        { .u64 = {0,                            0,                           0,                         100000ULL} },                     // 5
+        { .u64 = {0,                            0,                           0,                         1000000ULL} },                    // 6
+        { .u64 = {0,                            0,                           0,                         10000000ULL} },                   // 7
+        { .u64 = {0,                            0,                           0,                         100000000ULL} },                  // 8
+        { .u64 = {0,                            0,                           0,                         1000000000ULL} },                 // 9
+        { .u64 = {0,                            0,                           0,                         10000000000ULL} },                // 10
+        { .u64 = {0,                            0,                           0,                         100000000000ULL} },               // 11
+        { .u64 = {0,                            0,                           0,                         1000000000000ULL} },              // 12
+        { .u64 = {0,                            0,                           0,                         10000000000000ULL} },             // 13
+        { .u64 = {0,                            0,                           0,                         100000000000000ULL} },            // 14
+        { .u64 = {0,                            0,                           0,                         1000000000000000ULL} },           // 15
+        { .u64 = {0,                            0,                           0,                         10000000000000000ULL} },          // 16
+        { .u64 = {0,                            0,                           0,                         100000000000000000ULL} },         // 17
+        { .u64 = {0,                            0,                           0,                         1000000000000000000ULL} },        // 18
+        { .u64 = {0,                            0,                           0,                         10000000000000000000ULL} },       // 19
+        { .u64 = {0,                            0,                           5ULL,                      7766279631452241920ULL} },        // 20
+        { .u64 = {0,                            0,                           54ULL,                     3875820019684212736ULL} },        // 21
+        { .u64 = {0,                            0,                           542ULL,                    1864712049423024128ULL} },        // 22
+        { .u64 = {0,                            0,                           5421ULL,                   200376420520689664ULL} },         // 23
+        { .u64 = {0,                            0,                           54210ULL,                  2003764205206896640ULL} },        // 24
+        { .u64 = {0,                            0,                           542101ULL,                 1590897978359414784ULL} },        // 25
+        { .u64 = {0,                            0,                           5421010ULL,                15908979783594147840ULL} },       // 26
+        { .u64 = {0,                            0,                           54210108ULL,               11515845246265065472ULL} },       // 27
+        { .u64 = {0,                            0,                           542101086ULL,              4477988020393345024ULL} },        // 28
+        { .u64 = {0,                            0,                           5421010862ULL,             7886392056514347008ULL} },        // 29
+        { .u64 = {0,                            0,                           54210108624ULL,            5076944270305263616ULL} },        // 30
+        { .u64 = {0,                            0,                           542101086242ULL,           13875954555633532928ULL} },       // 31
+        { .u64 = {0,                            0,                           5421010862427ULL,          9632337040368467968ULL} },        // 32
+        { .u64 = {0,                            0,                           54210108624275ULL,         4089650035136921600ULL} },        // 33
+        { .u64 = {0,                            0,                           542101086242752ULL,        4003012203950112768ULL} },        // 34
+        { .u64 = {0,                            0,                           5421010862427522ULL,       3136633892082024448ULL} },        // 35
+        { .u64 = {0,                            0,                           54210108624275221ULL,      12919594847110692864ULL} },       // 36
+        { .u64 = {0,                            0,                           542101086242752217ULL,     68739955140067328ULL} },          // 37
+        { .u64 = {0,                            0,                           5421010862427522170ULL,    687399551400673280ULL} },         // 38
+        { .u64 = {0,                            2ULL,                        17316620476856118468ULL,   6873995514006732800ULL} },        // 39
+        { .u64 = {0,                            29ULL,                       7145508105175220139ULL,    13399722918938673152ULL} },       // 40
+        { .u64 = {0,                            293ULL,                      16114848830623546549ULL,   4870020673419870208ULL} },        // 41
+        { .u64 = {0,                            2938ULL,                     13574535716559052564ULL,   11806718586779598848ULL} },       // 42
+        { .u64 = {0,                            29387ULL,                    6618148649623664334ULL,    7386721425538678784ULL} },        // 43
+        { .u64 = {0,                            293873ULL,                   10841254275107988496ULL,   80237960548581376ULL} },          // 44
+        { .u64 = {0,                            2938735ULL,                  16178822382532126880ULL,   802379605485813760ULL} },          // 45
+        { .u64 = {0,                            29387358ULL,                 14214271235644855872ULL,   8023796054858137600ULL} },          // 46
+        { .u64 = {0,                            293873587ULL,                13015503840481697412ULL,   6450984253743169536ULL} },          // 47
+        { .u64 = {0,                            2938735877ULL,               1027829888850112811ULL,    9169610316303040512ULL} },          // 48
+        { .u64 = {0,                            29387358770ULL,              10278298888501128114ULL,   17909126868192198656ULL} },          // 49
+        { .u64 = {0,                            293873587705ULL,             10549268516463523069ULL,   13070572018536022016ULL} },          // 50
+        { .u64 = {0,                            2938735877055ULL,            13258964796087472617ULL,   1578511669393358848ULL} },          // 51
+        { .u64 = {0,                            29387358770557ULL,           3462439444907864858ULL,    15785116693933588480ULL} },          // 52
+        { .u64 = {0,                            293873587705571ULL,          16177650375369096972ULL,   10277214349659471872ULL} },          // 53
+        { .u64 = {0,                            2938735877055718ULL,         14202551164014556797ULL,   10538423128046960640ULL} },          // 54
+        { .u64 = {0,                            29387358770557187ULL,        12898303124178706663ULL,   13150510911921848320ULL} },          // 55
+        { .u64 = {0,                            293873587705571876ULL,       18302566799529756941ULL,   2377900603251621888ULL} },          // 56
+        { .u64 = {0,                            2938735877055718769ULL,      17004971331911604867ULL,   5332261958806667264ULL} },          // 57
+        { .u64 = {1,                            10940614696847636083ULL,     4029016655730084128ULL,    16429131440647569408ULL} },          // 58
+        { .u64 = {15ULL,                        17172426599928602752ULL,     3396678409881738056ULL,    16717361816799281152ULL} },          // 59
+        { .u64 = {159ULL,                       5703569335900062977ULL,      15520040025107828953ULL,   1152921504606846976ULL} },          // 60
+        { .u64 = {1593ULL,                      1695461137871974930ULL,      7626447661401876602ULL,    11529215046068469760ULL} },          // 61
+        { .u64 = {15930ULL,                     16954611378719749304ULL,     2477500319180559562ULL,    4611686018427387904ULL} },          // 62
+        { .u64 = {159309ULL,                    3525417123811528497ULL,      6328259118096044006ULL,    9223372036854775808ULL} },          // 63
+        { .u64 = {1593091ULL,                   16807427164405733357ULL,     7942358959831785217ULL,    0ULL} },                            // 64
+        { .u64 = {15930919ULL,                  2053574980671369030ULL,      5636613303479645706ULL,    0ULL} },                            // 65
+        { .u64 = {159309191ULL,                 2089005733004138687ULL,      1025900813667802212ULL,    0ULL} },                            // 66
+        { .u64 = {1593091911ULL,                2443313256331835254ULL,      10259008136678022120ULL,   0ULL} },                            // 67
+        { .u64 = {15930919111ULL,               5986388489608800929ULL,      10356360998232463120ULL,   0ULL} },                            // 68
+        { .u64 = {159309191113ULL,              4523652674959354447ULL,      11329889613776873120ULL,   0ULL} },                            // 69
+        { .u64 = {1593091911132ULL,             8343038602174441244ULL,      2618431695511421504ULL,    0ULL} },                            // 70
+        { .u64 = {15930919111324ULL,            9643409726906205977ULL,      7737572881404663424ULL,    0ULL} },                            // 71
+        { .u64 = {159309191113245ULL,           4200376900514301694ULL,      3588752519208427776ULL,    0ULL} },                            // 72
+        { .u64 = {1593091911132452ULL,          5110280857723913709ULL,      17440781118374726144ULL,   0ULL} },                            // 73
+        { .u64 = {15930919111324522ULL,         14209320429820033867ULL,     8387114520361296896ULL,    0ULL} },                            // 74
+        { .u64 = {159309191113245227ULL,        12965995782233477362ULL,     10084168908774762496ULL,   0ULL} },                            // 75
+        { .u64 = {1593091911132452277ULL,       532749306367912313ULL,       8607968719199866880ULL,    0ULL} },                            // 76
+        { .u64 = {15930919111324522770ULL,       5327493063679123134ULL,       12292710897160462336ULL,    0ULL} },                         // 77
+#else
+        { .u32 = {0, 0, 0, 0, 0, 0, 0, 1, } },
+        { .u32 = {0, 0, 0, 0, 0, 0, 0, 10, } },
+        { .u32 = {0, 0, 0, 0, 0, 0, 0, 100, } },
+        { .u32 = {0, 0, 0, 0, 0, 0, 0, 1000, } },
+        { .u32 = {0, 0, 0, 0, 0, 0, 0, 10000, } },
+        { .u32 = {0, 0, 0, 0, 0, 0, 0, 100000, } },
+        { .u32 = {0, 0, 0, 0, 0, 0, 0, 1000000, } },
+        { .u32 = {0, 0, 0, 0, 0, 0, 0, 10000000, } },
+        { .u32 = {0, 0, 0, 0, 0, 0, 0, 100000000, } },
+        { .u32 = {0, 0, 0, 0, 0, 0, 0, 1000000000, } },
+        { .u32 = {0, 0, 0, 0, 0, 0, 2, 1410065408, } },
+        { .u32 = {0, 0, 0, 0, 0, 0, 23, 1215752192, } },
+        { .u32 = {0, 0, 0, 0, 0, 0, 232, 3567587328, } },
+        { .u32 = {0, 0, 0, 0, 0, 0, 2328, 1316134912, } },
+        { .u32 = {0, 0, 0, 0, 0, 0, 23283, 276447232, } },
+        { .u32 = {0, 0, 0, 0, 0, 0, 232830, 2764472320, } },
+        { .u32 = {0, 0, 0, 0, 0, 0, 2328306, 1874919424, } },
+        { .u32 = {0, 0, 0, 0, 0, 0, 23283064, 1569325056, } },
+        { .u32 = {0, 0, 0, 0, 0, 0, 232830643, 2808348672, } },
+        { .u32 = {0, 0, 0, 0, 0, 0, 2328306436, 2313682944, } },
+        { .u32 = {0, 0, 0, 0, 0, 5, 1808227885, 1661992960, } },
+        { .u32 = {0, 0, 0, 0, 0, 54, 902409669, 3735027712, } },
+        { .u32 = {0, 0, 0, 0, 0, 542, 434162106, 2990538752, } },
+        { .u32 = {0, 0, 0, 0, 0, 5421, 46653770, 4135583744, } },
+        { .u32 = {0, 0, 0, 0, 0, 54210, 466537709, 2701131776, } },
+        { .u32 = {0, 0, 0, 0, 0, 542101, 370409800, 1241513984, } },
+        { .u32 = {0, 0, 0, 0, 0, 5421010, 3704098002, 3825205248, } },
+        { .u32 = {0, 0, 0, 0, 0, 54210108, 2681241660, 3892314112, } },
+        { .u32 = {0, 0, 0, 0, 0, 542101086, 1042612833, 268435456, } },
+        { .u32 = {0, 0, 0, 0, 1, 1126043566, 1836193738, 2684354560, } },
+        { .u32 = {0, 0, 0, 0, 12, 2670501072, 1182068202, 1073741824, } },
+        { .u32 = {0, 0, 0, 0, 126, 935206946, 3230747430, 2147483648, } },
+        { .u32 = {0, 0, 0, 0, 1262, 762134875, 2242703233, 0, } },
+        { .u32 = {0, 0, 0, 0, 12621, 3326381459, 952195850, 0, } },
+        { .u32 = {0, 0, 0, 0, 126217, 3199043520, 932023908, 0, } },
+        { .u32 = {0, 0, 0, 0, 1262177, 1925664130, 730304488, 0, } },
+        { .u32 = {0, 0, 0, 0, 12621774, 2076772117, 3008077584, 0, } },
+        { .u32 = {0, 0, 0, 0, 126217744, 3587851993, 16004768, 0, } },
+        { .u32 = {0, 0, 0, 0, 1262177448, 1518781562, 160047680, 0, } },
+        { .u32 = {0, 0, 0, 2, 4031839891, 2302913732, 1600476800, 0, } },
+        { .u32 = {0, 0, 0, 29, 1663693251, 1554300843, 3119866112, 0, } },
+        { .u32 = {0, 0, 0, 293, 3752030625, 2658106549, 1133890048, 0, } },
+        { .u32 = {0, 0, 0, 2938, 3160567888, 811261716, 2748965888, 0, } },
+        { .u32 = {0, 0, 0, 29387, 1540907809, 3817649870, 1719855104, 0, } },
+        { .u32 = {0, 0, 0, 293873, 2524176210, 3816760336, 18681856, 0, } },
+        { .u32 = {0, 0, 0, 2938735, 3766925628, 3807864992, 186818560, 0, } },
+        { .u32 = {0, 0, 0, 29387358, 3309517920, 3718911552, 1868185600, 0, } },
+        { .u32 = {0, 0, 0, 293873587, 3030408136, 2829377156, 1501986816, 0, } },
+        { .u32 = {0, 0, 0, 2938735877, 239310294, 2523967787, 2134966272, 0, } },
+        { .u32 = {0, 0, 6, 3617554994, 2393102945, 3764841394, 4169793536, 0, } },
+        { .u32 = {0, 0, 68, 1815811577, 2456192978, 3288675581, 3043229696, 0, } },
+        { .u32 = {0, 0, 684, 978246591, 3087093307, 2821984745, 367525888, 0, } },
+        { .u32 = {0, 0, 6842, 1192531325, 806162004, 2450043674, 3675258880, 0, } },
+        { .u32 = {0, 0, 68422, 3335378659, 3766652749, 3025600268, 2392850432, 0, } },
+        { .u32 = {0, 0, 684227, 3289015526, 3306789129, 191231613, 2453667840, 0, } },
+        { .u32 = {0, 0, 6842277, 2825384195, 3003120218, 1912316135, 3061841920, 0, } },
+        { .u32 = {0, 0, 68422776, 2484038180, 4261398408, 1943292173, 553648128, 0, } },
+        { .u32 = {0, 0, 684227765, 3365545329, 3959278420, 2253052547, 1241513984, 0, } },
+        { .u32 = {0, 1, 2547310361, 3590682227, 938078541, 1055688992, 3825205248, 0, } },
+        { .u32 = {0, 15, 3998267138, 1547083904, 790850820, 1966955336, 3892314112, 0, } },
+        { .u32 = {0, 159, 1327965719, 2585937153, 3613540908, 2489684185, 268435456, 0, } },
+        { .u32 = {0, 1593, 394755308, 89567762, 1775670717, 3422005370, 2684354560, 0, } },
+        { .u32 = {0, 15930, 3947553080, 895677624, 576837993, 4155282634, 1073741824, 0, } },
+        { .u32 = {0, 159309, 820825138, 366841649, 1473412643, 2898120678, 2147483648, 0, } },
+        { .u32 = {0, 1593091, 3913284084, 3668416493, 1849224548, 3211403009, 0, 0, } },
+        { .u32 = {0, 15930919, 478135184, 2324426566, 1312376303, 2049259018, 0, 0, } },
+        { .u32 = {0, 159309191, 486384549, 1769429183, 238861146, 3312720996, 0, 0, } },
+        { .u32 = {0, 1593091911, 568878198, 514422646, 2388611467, 3062438888, 0, 0, } },
+        { .u32 = {3, 3046017223, 1393814685, 849259169, 2411278197, 559617808, 0, 0, } },
+        { .u32 = {37, 395401161, 1053244963, 4197624399, 2637945491, 1301210784, 0, 0, } },
+        { .u32 = {370, 3954011612, 1942515047, 3321538332, 609651137, 127205952, 0, 0, } },
+        { .u32 = {3709, 885410460, 2245281293, 3150612249, 1801544074, 1272059520, 0, 0, } },
+        { .u32 = {37092, 264170013, 977976457, 1441351422, 835571558, 4130660608, 0, 0, } },
+        { .u32 = {370920, 2641700132, 1189829981, 1528612333, 4060748293, 2651900416, 0, 0, } },
+        { .u32 = {3709206, 647197546, 3308365221, 2401221451, 1952777272, 749200384, 0, 0, } },
+        { .u32 = {37092061, 2177008171, 3018881143, 2537378034, 2347903537, 3197036544, 0, 0, } },
+        { .u32 = {370920615, 295245237, 124040363, 3898943865, 2004198897, 1905594368, 0, 0, } },
+        { .u32 = {3709206150, 2952452370, 1240403639, 334732990, 2862119790, 1876074496, 0, 0, } },
+#endif
+};
+
+/**
+ * @brief dap_uint256_scan_uinteger
+ * Converts a string value to uint256_t. The string value must be an unsigned integer.
+ * @param a_str_integer char*
+ * @return uint256_t
+ */
+uint256_t dap_uint256_scan_uninteger(const char *a_str_uninteger);
+/*
+ * @breif dap_uint256_scan_decimal
+ *
+ * Convert a text representation of the coins amount in to
+ * the binary uint256 value .
+ *      Coins string can be in form:
+ *          - "123.00456"
+ *
+ * @param a_str_decimal A text string in format
+ *
+ * @return uint256_t
+ */
+uint256_t dap_uint256_scan_decimal(const char *a_str_decimal);
+/**
+ * @brief dap_uint256_uninteger_to_char
+ * Convert a uint256_t value to a string value. Uint256_t is treated as an unsigned integer value.
+ * @param a_uint256 unsigned integer value
+ * @return char* String representation of the uint256_t value.
+ */
+char *dap_uint256_uninteger_to_char(uint256_t a_uint256);
+/**
+ * @brief dap_uint256_decimal_to_char
+ *
+ * Converts a value from uint256_t to a string. The uint256_t value is treated as a fixed-point value.
+ *
+ * @param a_uint256
+ * @return char*
+ */
+char *dap_uint256_decimal_to_char(uint256_t a_uint256);
diff --git a/core/include/dap_math_ops.h b/core/include/dap_math_ops.h
index f7e11d6cb..3c58fc050 100755
--- a/core/include/dap_math_ops.h
+++ b/core/include/dap_math_ops.h
@@ -1116,304 +1116,6 @@ static inline void DIV_256_COIN(uint256_t a, uint256_t b, uint256_t *res)
     *res = a_copy;
 }
 
-/**
- * @brief dap_uint256_scan_uinteger
- * Converts a string value to uint256_t. The string value must be an unsigned integer.
- * @param a_str_integer char*
- * @return uint256_t
- */
-uint256_t dap_uint256_scan_uinteger(char *a_str_integer){
-    uint256_t l_ret = uint256_0, l_nul = uint256_0;
-    int  l_strlen;
-    char l_256bit_num[DAP_CHAIN$SZ_MAX256DEC + 1];
-    int overflow_flag = 0;
-
-    if (!a_256bit_num) {
-        return log_it(L_ERROR, "NULL as an argument"), l_nul;
-    }
-
-    /* Convert number from xxx.yyyyE+zz to xxxyyyy0000... */
-    char *l_eptr = strchr(a_256bit_num, 'e');
-    if (!l_eptr)
-        l_eptr = strchr(a_256bit_num, 'E');
-    if (l_eptr) {
-        /* Compute & check length */
-        if ( (l_strlen = strnlen(a_256bit_num, DAP_SZ_MAX256SCINOT + 1) ) > DAP_SZ_MAX256SCINOT)
-            return  log_it(L_ERROR, "Too many digits in `%s` (%d > %d)", a_256bit_num, l_strlen, DAP_SZ_MAX256SCINOT), l_nul;
-
-        char *l_exp_ptr = l_eptr + 1;
-        if (*l_exp_ptr == '+')
-            l_exp_ptr++;
-        int l_exp = atoi(l_exp_ptr);
-        if (!l_exp)
-            return  log_it(L_ERROR, "Invalid exponent %s", l_eptr), uint256_0;
-        char *l_dot_ptr = strchr(a_256bit_num, '.');
-        if (!l_dot_ptr || l_dot_ptr > l_eptr)
-            return  log_it(L_ERROR, "Invalid number format with exponent %d", l_exp), uint256_0;
-        int l_dot_len = l_dot_ptr - a_256bit_num;
-        if (l_dot_len >= DATOSHI_POW256)
-            return log_it(L_ERROR, "Too many digits in '%s'", a_256bit_num), uint256_0;
-        int l_exp_len = l_eptr - a_256bit_num - l_dot_len - 1;
-        if (l_exp_len + l_dot_len + 1 >= DAP_SZ_MAX256SCINOT)
-            return log_it(L_ERROR, "Too many digits in '%s'", a_256bit_num), uint256_0;
-        if (l_exp < l_exp_len) {
-            //todo: we need to handle numbers like 1.23456789000000e9
-            return log_it(L_ERROR, "Invalid number format with exponent %d and number count after dot %d", l_exp,
-                          l_exp_len), uint256_0;
-        }
-        memcpy(l_256bit_num, a_256bit_num, l_dot_len);
-        memcpy(l_256bit_num + l_dot_len, a_256bit_num + l_dot_len + 1, l_exp_len);
-        int l_zero_cnt = l_exp - l_exp_len;
-        if (l_zero_cnt > DATOSHI_POW256) {
-            //todo: need to handle leading zeroes, like 0.000...123e100
-            return log_it(L_ERROR, "Too long number for 256 bit: `%s` (%d > %d)", a_256bit_num, l_strlen, DAP_CHAIN$SZ_MAX256DEC), l_nul;
-        }
-        size_t l_pos = l_dot_len + l_exp_len;
-        for (int i = l_zero_cnt; i && l_pos < DATOSHI_POW256; i--)
-            l_256bit_num[l_pos++] = '0';
-        l_256bit_num[l_pos] = '\0';
-        l_strlen = l_pos;
-
-    } else {
-        // We have a decimal string, not sci notation
-        /* Compute & check length */
-        if ( (l_strlen = strnlen(a_256bit_num, DATOSHI_POW256 + 1) ) > DATOSHI_POW256)
-            return  log_it(L_ERROR, "Too many digits in `%s` (%d > %d)", a_256bit_num, l_strlen, DATOSHI_POW256), l_nul;
-        memcpy(l_256bit_num, a_256bit_num, l_strlen);
-        l_256bit_num[l_strlen] = '\0';
-    }
-
-    for (int i = 0; i < l_strlen ; i++) {
-        char c = l_256bit_num[l_strlen - i - 1];
-        if (!isdigit(c)) {
-            log_it(L_WARNING, "Incorrect input number");
-            return l_nul;
-        }
-        uint8_t l_digit = c - '0';
-        if (!l_digit)
-            continue;
-#ifdef DAP_GLOBAL_IS_INT128
-        uint256_t l_tmp;
-        l_tmp.hi = 0;
-        l_tmp.lo = (uint128_t)c_pow10_double[i].u64[3] * (uint128_t) l_digit;
-        overflow_flag = SUM_256_256(l_ret, l_tmp, &l_ret);
-        if (overflow_flag) {
-            //todo: change string to uint256_max after implementation
-            return log_it(L_ERROR, "Too big number '%s', max number is '%s'", a_256bit_num, "115792089237316195423570985008687907853269984665640564039457584007913129639935"), l_nul;
-        }
-//        if (l_ret.hi == 0 && l_ret.lo == 0) {
-//            return l_nul;
-//        }
-        uint128_t l_mul = (uint128_t) c_pow10_double[i].u64[2] * (uint128_t) l_digit;
-        l_tmp.lo = l_mul << 64;
-        l_tmp.hi = l_mul >> 64;
-        overflow_flag = SUM_256_256(l_ret, l_tmp, &l_ret);
-        if (overflow_flag) {
-            //todo: change string to uint256_max after implementation
-            return log_it(L_ERROR, "Too big number '%s', max number is '%s'", a_256bit_num, "115792089237316195423570985008687907853269984665640564039457584007913129639935"), l_nul;
-        }
-
-        if (l_ret.hi == 0 && l_ret.lo == 0) {
-            return l_nul;
-        }
-
-        l_tmp.lo = 0;
-        l_tmp.hi = (uint128_t) c_pow10_double[i].u64[1] * (uint128_t) l_digit;
-        overflow_flag = SUM_256_256(l_ret, l_tmp, &l_ret);
-        if (overflow_flag) {
-            //todo: change string to uint256_max after implementation
-            return log_it(L_ERROR, "Too big number '%s', max number is '%s'", a_256bit_num, "115792089237316195423570985008687907853269984665640564039457584007913129639935"), l_nul;
-        }
-        if (l_ret.hi == 0 && l_ret.lo == 0) {
-            return l_nul;
-        }
-
-        l_mul = (uint128_t) c_pow10_double[i].u64[0] * (uint128_t) l_digit;
-        if (l_mul >> 64) {
-            log_it(L_WARNING, "Input number is too big");
-            return l_nul;
-        }
-        l_tmp.hi = l_mul << 64;
-        overflow_flag = SUM_256_256(l_ret, l_tmp, &l_ret);
-        if (overflow_flag) {
-            //todo: change string to uint256_max after implementation
-            return log_it(L_ERROR, "Too big number '%s', max number is '%s'", a_256bit_num, "115792089237316195423570985008687907853269984665640564039457584007913129639935"), l_nul;
-        }
-        if (l_ret.hi == 0 && l_ret.lo == 0) {
-            return l_nul;
-        }
-#else
-        uint256_t l_tmp;
-        for (int j = 7; j>=0; j--) {
-            l_tmp = GET_256_FROM_64((uint64_t) c_pow10_double[i].u32[j]);
-            if (IS_ZERO_256(l_tmp)) {
-                if (j < 6) { // in table, we have only 7 and 6 position with 0-es but 5..0 non-zeroes, so if we have zero on 5 or less, there is no significant position anymore
-                    break;
-                }
-                else {
-                    continue;
-                }
-            }
-            LEFT_SHIFT_256(l_tmp, &l_tmp, 32 * (7-j));
-            overflow_flag = MULT_256_256(l_tmp, GET_256_FROM_64(l_digit), &l_tmp);
-            if (overflow_flag) {
-                //todo: change string to uint256_max after implementation
-                return log_it(L_ERROR, "Too big number '%s', max number is '%s'", a_256bit_num, "115792089237316195423570985008687907853269984665640564039457584007913129639935"), l_nul;
-            }
-            overflow_flag = SUM_256_256(l_ret, l_tmp, &l_ret);
-            if (overflow_flag) {
-                //todo: change string to uint256_max after implementation
-                return log_it(L_ERROR, "Too big number '%s', max number is '%s'", a_256bit_num, "115792089237316195423570985008687907853269984665640564039457584007913129639935"), l_nul;
-            }
-        }
-#endif
-    }
-    return l_ret;
-}
-
-/*
- * @breif dap_uint256_scan_decimal
- *
- * Convert a text representation of the coins amount in to
- * the binary uint256 value .
- *      Coins string can be in form:
- *          - "123.00456"
- *
- * @param a_str_decimal A text string in format
- *
- * @return uint256_t
- */
-uint256_t dap_uint256_scan_decimal(char *a_str_decimal){
-    int l_len, l_pos;
-    char    l_buf  [DAP_CHAIN$SZ_MAX256DEC + 8] = {0}, *l_point;
-
-    /* "12300000000.0000456" */
-    if ( (l_len = strnlen(a_coins, DATOSHI_POW256 + 2)) > DATOSHI_POW256 + 1)/* Check for legal length */ /* 1 symbol for \0, one for '.', if more, there is an error */
-        return  log_it(L_WARNING, "Incorrect balance format of '%s' - too long (%d > %d)", a_coins,
-                       l_len, DATOSHI_POW256 + 1), uint256_0;
-
-    /* Find , check and remove 'precision' dot symbol */
-    memcpy (l_buf, a_coins, l_len);                                         /* Make local copy */
-    if ( !(l_point = memchr(l_buf, '.', l_len)) )                           /* Is there 'dot' ? */
-        return  log_it(L_WARNING, "Incorrect balance format of '%s' - no precision mark", a_coins),
-                uint256_0;
-
-    l_pos = l_len - (l_point - l_buf);                                      /* Check number of decimals after dot */
-    l_pos--;
-    if ( (l_pos ) >  DATOSHI_DEGREE )
-        return  log_it(L_WARNING, "Incorrect balance format of '%s' - too much precision", l_buf), uint256_0;
-
-    /* "123.456" -> "123456" */
-    memmove(l_point, l_point + 1, l_pos);                                   /* Shift left a right part of the decimal string
-                                                                              to dot symbol place */
-    *(l_point + l_pos) = '\0';
-
-    /* Add trailer zeros:
-     *                pos
-     *                 |
-     * 123456 -> 12345600...000
-     *           ^            ^
-     *           |            |
-     *           +-18 digits--+
-     */
-    memset(l_point + l_pos, '0', DATOSHI_DEGREE - l_pos);
-
-    return dap_cvt_str_to_uint256 (l_buf);
-}
-
-/**
- * @brief dap_uint256_uninteger_to_char
- * Convert a uint256_t value to a string value. Uint256_t is treated as an unsigned integer value.
- * @param a_uint256 unsigned integer value
- * @return char* String representation of the uint256_t value.
- */
-char *dap_uint256_uninteger_to_char(uint256_t a_uint256) {
-    char *l_buf = DAP_NEW_Z_SIZE(char, DATOSHI_POW256 + 2); // for decimal dot and trailing zero
-    if (!l_buf) {
-        log_it(L_CRITICAL, "Memory allocation error");
-        return NULL;
-    }
-    int l_pos = 0;
-    uint256_t l_value = a_uint256;
-    uint256_t uint256_ten = GET_256_FROM_64(10);
-    uint256_t rem;
-    do {
-        divmod_impl_256(l_value, uint256_ten, &l_value, &rem);
-#ifdef DAP_GLOBAL_IS_INT128
-        l_buf[l_pos++] = rem.lo + '0';
-#else
-        l_buf[l_pos++] = rem.lo.lo + (unsigned long long) '0';
-#endif
-    } while (!IS_ZERO_256(l_value));
-    int l_strlen = strlen(l_buf) - 1;
-    for (int i = 0; i < (l_strlen + 1) / 2; i++) {
-        char c = l_buf[i];
-        l_buf[i] = l_buf[l_strlen - i];
-        l_buf[l_strlen - i] = c;
-    }
-    return l_buf;
-}
-
-/**
- * @brief dap_uint256_decimal_to_char
- *
- * Converts a value from uint256_t to a string. The uint256_t value is treated as a fixed-point value.
- *
- * @param a_uint256
- * @return char*
- */
-char *dap_uint256_decimal_to_char(uint256_t a_uint256){
-    char *l_buf, *l_cp;
-    int l_strlen, l_len;
-
-    /* 123000...456 -> "123000...456" */
-    if ( !(l_buf = dap_cvt_uint256_to_str(a_balance)) )
-        return NULL;
-
-    l_strlen = strlen(l_buf);
-
-    if ( 0 < (l_len = (l_strlen - DATOSHI_DEGREE)) )
-    {
-        l_cp = l_buf + l_len;                                               /* Move last 18 symbols to one position right */
-        memmove(l_cp + 1, l_cp, DATOSHI_DEGREE);
-        *l_cp = '.';                                                        /* Insert '.' separator */
-
-        l_strlen++;                                                         /* Adjust string len in the buffer */
-    } else {
-        l_len = DATOSHI_DEGREE - l_strlen;                           /* Add leading "0." */
-        l_cp = l_buf;
-        memmove(l_cp + l_len + 2, l_cp, DATOSHI_DEGREE - l_len);                                     /* Move last 18 symbols to 2 positions right */
-        memset(l_cp, '0', l_len + 2);
-        *(++l_cp) = '.';
-        l_strlen += 2;                                                      /* Adjust string len in the buffer */
-    }
-
-    if ( *(l_cp = l_buf) == '0' )                                           /* Is there lead zeroes ? */
-    {
-        /* 000000000000000000000.000000000000000001 */
-        /* 000000000000000000123.000000000000000001 */
-        for ( l_cp += 1; *l_cp == '0'; l_cp++);                             /* Skip all '0' symbols */
-
-        if ( *l_cp == '.' )                                                 /* l_cp point to separator - then step back */
-            l_cp--;
-
-        if ( (l_len = (l_cp - l_buf)) )
-        {
-            l_len = l_strlen - l_len;                                       /* A part of the buffer to be moved to begin */
-            memmove(l_buf, l_cp, l_len);                                    /* Move and terminated by zero */
-            l_buf[l_len] = '\0';
-        }
-
-        l_strlen = l_len;                                                   /* Adjust string len in the buffer */
-    }
-
-    for ( l_cp = l_buf + strlen(l_buf) - 1; *l_cp == '0' && l_cp >= l_buf; l_cp--)
-        if (*(l_cp - 1) != '.')
-            *l_cp = '\0';
-
-    return l_buf;
-}
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/core/src/dap_math_convert.c b/core/src/dap_math_convert.c
new file mode 100644
index 000000000..6f3a44086
--- /dev/null
+++ b/core/src/dap_math_convert.c
@@ -0,0 +1,269 @@
+#include "dap_math_convert.h"
+
+#define LOG_TAG "dap_math_convert"
+
+uint256_t dap_uint256_scan_uninteger(const char *a_str_uninteger){ //dap_chain_balance_print
+    uint256_t l_ret = uint256_0, l_nul = uint256_0;
+    int  l_strlen;
+    char l_256bit_num[DAP_CHAIN$SZ_MAX256DEC + 1];
+    int overflow_flag = 0;
+
+    if (!a_str_uninteger) {
+        return log_it(L_ERROR, "NULL as an argument"), l_nul;
+    }
+
+    /* Convert number from xxx.yyyyE+zz to xxxyyyy0000... */
+    char *l_eptr = strchr(a_str_uninteger, 'e');
+    if (!l_eptr)
+        l_eptr = strchr(a_str_uninteger, 'E');
+    if (l_eptr) {
+        /* Compute & check length */
+        if ( (l_strlen = strnlen(a_str_uninteger, DAP_SZ_MAX256SCINOT + 1) ) > DAP_SZ_MAX256SCINOT)
+            return  log_it(L_ERROR, "Too many digits in `%s` (%d > %d)", a_str_uninteger, l_strlen, DAP_SZ_MAX256SCINOT), l_nul;
+
+        char *l_exp_ptr = l_eptr + 1;
+        if (*l_exp_ptr == '+')
+            l_exp_ptr++;
+        int l_exp = atoi(l_exp_ptr);
+        if (!l_exp)
+            return  log_it(L_ERROR, "Invalid exponent %s", l_eptr), uint256_0;
+        char *l_dot_ptr = strchr(a_str_uninteger, '.');
+        if (!l_dot_ptr || l_dot_ptr > l_eptr)
+            return  log_it(L_ERROR, "Invalid number format with exponent %d", l_exp), uint256_0;
+        int l_dot_len = l_dot_ptr - a_str_uninteger;
+        if (l_dot_len >= DATOSHI_POW256)
+            return log_it(L_ERROR, "Too many digits in '%s'", a_str_uninteger), uint256_0;
+        int l_exp_len = l_eptr - a_str_uninteger - l_dot_len - 1;
+        if (l_exp_len + l_dot_len + 1 >= DAP_SZ_MAX256SCINOT)
+            return log_it(L_ERROR, "Too many digits in '%s'", a_str_uninteger), uint256_0;
+        if (l_exp < l_exp_len) {
+            //todo: we need to handle numbers like 1.23456789000000e9
+            return log_it(L_ERROR, "Invalid number format with exponent %d and number count after dot %d", l_exp,
+                          l_exp_len), uint256_0;
+        }
+        memcpy(l_256bit_num, a_str_uninteger, l_dot_len);
+        memcpy(l_256bit_num + l_dot_len, a_str_uninteger + l_dot_len + 1, l_exp_len);
+        int l_zero_cnt = l_exp - l_exp_len;
+        if (l_zero_cnt > DATOSHI_POW256) {
+            //todo: need to handle leading zeroes, like 0.000...123e100
+            return log_it(L_ERROR, "Too long number for 256 bit: `%s` (%d > %d)", a_str_uninteger, l_strlen, DAP_CHAIN$SZ_MAX256DEC), l_nul;
+        }
+        size_t l_pos = l_dot_len + l_exp_len;
+        for (int i = l_zero_cnt; i && l_pos < DATOSHI_POW256; i--)
+            l_256bit_num[l_pos++] = '0';
+        l_256bit_num[l_pos] = '\0';
+        l_strlen = l_pos;
+
+    } else {
+        // We have a decimal string, not sci notation
+        /* Compute & check length */
+        if ( (l_strlen = strnlen(a_str_uninteger, DATOSHI_POW256 + 1) ) > DATOSHI_POW256)
+            return  log_it(L_ERROR, "Too many digits in `%s` (%d > %d)", a_str_uninteger, l_strlen, DATOSHI_POW256), l_nul;
+        memcpy(l_256bit_num, a_str_uninteger, l_strlen);
+        l_256bit_num[l_strlen] = '\0';
+    }
+
+    for (int i = 0; i < l_strlen ; i++) {
+        char c = l_256bit_num[l_strlen - i - 1];
+        if (!isdigit(c)) {
+            log_it(L_WARNING, "Incorrect input number");
+            return l_nul;
+        }
+        uint8_t l_digit = c - '0';
+        if (!l_digit)
+            continue;
+#ifdef DAP_GLOBAL_IS_INT128
+        uint256_t l_tmp;
+        l_tmp.hi = 0;
+        l_tmp.lo = (uint128_t)c_pow10_double[i].u64[3] * (uint128_t) l_digit;
+        overflow_flag = SUM_256_256(l_ret, l_tmp, &l_ret);
+        if (overflow_flag) {
+            //todo: change string to uint256_max after implementation
+            return log_it(L_ERROR, "Too big number '%s', max number is '%s'", a_str_uninteger, "115792089237316195423570985008687907853269984665640564039457584007913129639935"), l_nul;
+        }
+//        if (l_ret.hi == 0 && l_ret.lo == 0) {
+//            return l_nul;
+//        }
+        uint128_t l_mul = (uint128_t) c_pow10_double[i].u64[2] * (uint128_t) l_digit;
+        l_tmp.lo = l_mul << 64;
+        l_tmp.hi = l_mul >> 64;
+        overflow_flag = SUM_256_256(l_ret, l_tmp, &l_ret);
+        if (overflow_flag) {
+            //todo: change string to uint256_max after implementation
+            return log_it(L_ERROR, "Too big number '%s', max number is '%s'", a_str_uninteger, "115792089237316195423570985008687907853269984665640564039457584007913129639935"), l_nul;
+        }
+
+        if (l_ret.hi == 0 && l_ret.lo == 0) {
+            return l_nul;
+        }
+
+        l_tmp.lo = 0;
+        l_tmp.hi = (uint128_t) c_pow10_double[i].u64[1] * (uint128_t) l_digit;
+        overflow_flag = SUM_256_256(l_ret, l_tmp, &l_ret);
+        if (overflow_flag) {
+            //todo: change string to uint256_max after implementation
+            return log_it(L_ERROR, "Too big number '%s', max number is '%s'", a_str_uninteger, "115792089237316195423570985008687907853269984665640564039457584007913129639935"), l_nul;
+        }
+        if (l_ret.hi == 0 && l_ret.lo == 0) {
+            return l_nul;
+        }
+
+        l_mul = (uint128_t) c_pow10_double[i].u64[0] * (uint128_t) l_digit;
+        if (l_mul >> 64) {
+            log_it(L_WARNING, "Input number is too big");
+            return l_nul;
+        }
+        l_tmp.hi = l_mul << 64;
+        overflow_flag = SUM_256_256(l_ret, l_tmp, &l_ret);
+        if (overflow_flag) {
+            //todo: change string to uint256_max after implementation
+            return log_it(L_ERROR, "Too big number '%s', max number is '%s'", a_str_uninteger, "115792089237316195423570985008687907853269984665640564039457584007913129639935"), l_nul;
+        }
+        if (l_ret.hi == 0 && l_ret.lo == 0) {
+            return l_nul;
+        }
+#else
+        uint256_t l_tmp;
+        for (int j = 7; j>=0; j--) {
+            l_tmp = GET_256_FROM_64((uint64_t) c_pow10_double[i].u32[j]);
+            if (IS_ZERO_256(l_tmp)) {
+                if (j < 6) { // in table, we have only 7 and 6 position with 0-es but 5..0 non-zeroes, so if we have zero on 5 or less, there is no significant position anymore
+                    break;
+                }
+                else {
+                    continue;
+                }
+            }
+            LEFT_SHIFT_256(l_tmp, &l_tmp, 32 * (7-j));
+            overflow_flag = MULT_256_256(l_tmp, GET_256_FROM_64(l_digit), &l_tmp);
+            if (overflow_flag) {
+                //todo: change string to uint256_max after implementation
+                return log_it(L_ERROR, "Too big number '%s', max number is '%s'", a_str_uninteger, "115792089237316195423570985008687907853269984665640564039457584007913129639935"), l_nul;
+            }
+            overflow_flag = SUM_256_256(l_ret, l_tmp, &l_ret);
+            if (overflow_flag) {
+                //todo: change string to uint256_max after implementation
+                return log_it(L_ERROR, "Too big number '%s', max number is '%s'", a_str_uninteger, "115792089237316195423570985008687907853269984665640564039457584007913129639935"), l_nul;
+            }
+        }
+#endif
+    }
+    return l_ret;
+}
+
+uint256_t dap_uint256_scan_decimal(const char *a_str_decimal){
+    int l_len, l_pos;
+    char    l_buf  [DAP_CHAIN$SZ_MAX256DEC + 8] = {0}, *l_point;
+
+    /* "12300000000.0000456" */
+    if ( (l_len = strnlen(a_str_decimal, DATOSHI_POW256 + 2)) > DATOSHI_POW256 + 1)/* Check for legal length */ /* 1 symbol for \0, one for '.', if more, there is an error */
+        return  log_it(L_WARNING, "Incorrect balance format of '%s' - too long (%d > %d)", a_str_decimal,
+                       l_len, DATOSHI_POW256 + 1), uint256_0;
+
+    /* Find , check and remove 'precision' dot symbol */
+    memcpy (l_buf, a_str_decimal, l_len);                                         /* Make local copy */
+    if ( !(l_point = memchr(l_buf, '.', l_len)) )                           /* Is there 'dot' ? */
+        return  log_it(L_WARNING, "Incorrect balance format of '%s' - no precision mark", a_str_decimal),
+                uint256_0;
+
+    l_pos = l_len - (l_point - l_buf);                                      /* Check number of decimals after dot */
+    l_pos--;
+    if ( (l_pos ) >  DATOSHI_DEGREE )
+        return  log_it(L_WARNING, "Incorrect balance format of '%s' - too much precision", l_buf), uint256_0;
+
+    /* "123.456" -> "123456" */
+    memmove(l_point, l_point + 1, l_pos);                                   /* Shift left a right part of the decimal string
+                                                                              to dot symbol place */
+    *(l_point + l_pos) = '\0';
+
+    /* Add trailer zeros:
+     *                pos
+     *                 |
+     * 123456 -> 12345600...000
+     *           ^            ^
+     *           |            |
+     *           +-18 digits--+
+     */
+    memset(l_point + l_pos, '0', DATOSHI_DEGREE - l_pos);
+
+    return dap_uint256_scan_uninteger(l_buf);
+}
+
+char *dap_uint256_uninteger_to_char(uint256_t a_uint256) {
+    char *l_buf = DAP_NEW_Z_SIZE(char, DATOSHI_POW256 + 2); // for decimal dot and trailing zero
+    if (!l_buf) {
+        log_it(L_CRITICAL, "Memory allocation error");
+        return NULL;
+    }
+    int l_pos = 0;
+    uint256_t l_value = a_uint256;
+    uint256_t uint256_ten = GET_256_FROM_64(10);
+    uint256_t rem;
+    do {
+        divmod_impl_256(l_value, uint256_ten, &l_value, &rem);
+#ifdef DAP_GLOBAL_IS_INT128
+        l_buf[l_pos++] = rem.lo + '0';
+#else
+        l_buf[l_pos++] = rem.lo.lo + (unsigned long long) '0';
+#endif
+    } while (!IS_ZERO_256(l_value));
+    int l_strlen = strlen(l_buf) - 1;
+    for (int i = 0; i < (l_strlen + 1) / 2; i++) {
+        char c = l_buf[i];
+        l_buf[i] = l_buf[l_strlen - i];
+        l_buf[l_strlen - i] = c;
+    }
+    return l_buf;
+}
+
+char *dap_uint256_decimal_to_char(uint256_t a_uint256){
+    char *l_buf, *l_cp;
+    int l_strlen, l_len;
+
+    /* 123000...456 -> "123000...456" */
+    if ( !(l_buf = dap_uint256_uninteger_to_char(a_uint256)) )
+        return NULL;
+
+    l_strlen = strlen(l_buf);
+
+    if ( 0 < (l_len = (l_strlen - DATOSHI_DEGREE)) )
+    {
+        l_cp = l_buf + l_len;                                               /* Move last 18 symbols to one position right */
+        memmove(l_cp + 1, l_cp, DATOSHI_DEGREE);
+        *l_cp = '.';                                                        /* Insert '.' separator */
+
+        l_strlen++;                                                         /* Adjust string len in the buffer */
+    } else {
+        l_len = DATOSHI_DEGREE - l_strlen;                           /* Add leading "0." */
+        l_cp = l_buf;
+        memmove(l_cp + l_len + 2, l_cp, DATOSHI_DEGREE - l_len);                                     /* Move last 18 symbols to 2 positions right */
+        memset(l_cp, '0', l_len + 2);
+        *(++l_cp) = '.';
+        l_strlen += 2;                                                      /* Adjust string len in the buffer */
+    }
+
+    if ( *(l_cp = l_buf) == '0' )                                           /* Is there lead zeroes ? */
+    {
+        /* 000000000000000000000.000000000000000001 */
+        /* 000000000000000000123.000000000000000001 */
+        for ( l_cp += 1; *l_cp == '0'; l_cp++);                             /* Skip all '0' symbols */
+
+        if ( *l_cp == '.' )                                                 /* l_cp point to separator - then step back */
+            l_cp--;
+
+        if ( (l_len = (l_cp - l_buf)) )
+        {
+            l_len = l_strlen - l_len;                                       /* A part of the buffer to be moved to begin */
+            memmove(l_buf, l_cp, l_len);                                    /* Move and terminated by zero */
+            l_buf[l_len] = '\0';
+        }
+
+        l_strlen = l_len;                                                   /* Adjust string len in the buffer */
+    }
+
+    for ( l_cp = l_buf + strlen(l_buf) - 1; *l_cp == '0' && l_cp >= l_buf; l_cp--)
+        if (*(l_cp - 1) != '.')
+            *l_cp = '\0';
+
+    return l_buf;
+}
-- 
GitLab


From fd831ab84806e9fe2848e5b8a7134d56af96a5b8 Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Tue, 31 Oct 2023 20:24:45 +0700
Subject: [PATCH 12/21] [*] Fixed in call function scan and print uint256
 value.

---
 core/test/uint256_t/256_tests.cc   | 1084 ++++++++++++++--------------
 core/test/uint256_t/CMakeLists.txt |   24 +-
 2 files changed, 553 insertions(+), 555 deletions(-)

diff --git a/core/test/uint256_t/256_tests.cc b/core/test/uint256_t/256_tests.cc
index 92b23974a..87f2df9cb 100644
--- a/core/test/uint256_t/256_tests.cc
+++ b/core/test/uint256_t/256_tests.cc
@@ -8,8 +8,8 @@
 using namespace std;
 #include <iostream>
 
-//#include "dap_chain_common.h"
 #include "dap_math_ops.h"
+#include "dap_math_convert.h"
 
 #include "gtest/gtest-spi.h"
 
@@ -149,7 +149,7 @@ TEST(InputTests, ZeroInputBase) {
 
 TEST_P(Parameterized64Input, Input) {
     uint64_t a = GetParam();
-    check_equality256(dap_chain_uint256_from(a), a);
+    check_equality256(GET_256_FROM_64(a), a);
 }
 INSTANTIATE_TEST_SUITE_P(OneBit, Parameterized64Input, testing::ValuesIn(one_bits));
 INSTANTIATE_TEST_SUITE_P(AllBit, Parameterized64Input, testing::ValuesIn(all_bits));
@@ -161,135 +161,135 @@ TEST(InputTests, ZeroInputFromString) {
 }
 
 TEST(InputTests, MaxInputFromString) {
-    uint256_t a = dap_chain_balance_scan(MAX64STR);
+    uint256_t a = dap_uint256_scan_uninteger(MAX64STR);
 
     check_equality256(a, MAX64STR);
 }
 
 TEST(InputTests, Min128FromString) {
-    uint256_t a = dap_chain_balance_scan(MIN128STR);
+    uint256_t a = dap_uint256_scan_uninteger(MIN128STR);
 
     check_equality256(a, MIN128STR);
 }
 
 TEST(InputTests, Max128FromString) {
-    uint256_t a = dap_chain_balance_scan(MAX128STR);
+    uint256_t a = dap_uint256_scan_uninteger(MAX128STR);
 
     check_equality256(a, MAX128STR);
 }
 
 TEST(InputTests, Min256FromString) {
-    uint256_t a = dap_chain_balance_scan(MIN256STR);
+    uint256_t a = dap_uint256_scan_uninteger(MIN256STR);
 
     check_equality256(a, MIN256STR);
 }
 
 TEST(InputTests, Max256FromString) {
-    uint256_t a = dap_chain_balance_scan(MAX256STR);
+    uint256_t a = dap_uint256_scan_uninteger(MAX256STR);
 
     check_equality256(a, MAX256STR);
 }
 
 TEST(InputTests, EmptyInput) {
-    uint256_t a = dap_chain_balance_scan("");
+    uint256_t a = dap_uint256_scan_uninteger("");
 
     check_equality256(a, 0);
 }
 
 TEST(InputTests, NullInput) {
-    uint256_t a = dap_chain_balance_scan(NULL);
+    uint256_t a = dap_uint256_scan_uninteger(NULL);
 
     check_equality256(a, 0);
 }
 
 TEST(InputTests, TooLongInputSome) {
     //some decimal symbols more
-    uint256_t a = dap_chain_balance_scan("11579208923731619542357098500868790785326998466564056403945758400791312963993123465");
+    uint256_t a = dap_uint256_scan_uninteger("11579208923731619542357098500868790785326998466564056403945758400791312963993123465");
 
     check_equality256(a, 0);
 }
 
 TEST(InputTests, TooLongInputOne) {
     //one decimal symbol more
-    uint256_t a = dap_chain_balance_scan("1157920892373161954235709850086879078532699846656405640394575840079131296399351");
+    uint256_t a = dap_uint256_scan_uninteger("1157920892373161954235709850086879078532699846656405640394575840079131296399351");
 
     check_equality256(a, 0);
 }
 
 TEST(InputTests, OverflowTestLeastBit) {
     //one bit more (like decimal 6 instead of decimal 5 on last symbol)
-    uint256_t a = dap_chain_balance_scan("115792089237316195423570985008687907853269984665640564039457584007913129639936");
+    uint256_t a = dap_uint256_scan_uninteger("115792089237316195423570985008687907853269984665640564039457584007913129639936");
 
     check_equality256(a, 0);
 }
 
 TEST(InputTests, OverflowTestsMostBit) {
     //2 instead of 1 one most-significant digit
-    uint256_t a = dap_chain_balance_scan("215792089237316195423570985008687907853269984665640564039457584007913129639935");
+    uint256_t a = dap_uint256_scan_uninteger("215792089237316195423570985008687907853269984665640564039457584007913129639935");
 
     check_equality256(a, 0);
 }
 
 TEST(InputTests, OverflowTestsNotMostBit) {
     //2 instead of 1 one most-significant digit
-    uint256_t a = dap_chain_balance_scan("125792089237316195423570985008687907853269984665640564039457584007913129639935");
+    uint256_t a = dap_uint256_scan_uninteger("125792089237316195423570985008687907853269984665640564039457584007913129639935");
 
     check_equality256(a, 0);
 }
 
 TEST(InputTests, NonDigitSymbolsInputHexadermical) {
-    uint256_t a = dap_chain_balance_scan("123a23");
+    uint256_t a = dap_uint256_scan_uninteger("123a23");
     //todo: check that this is logging
 
     check_equality256(a, 0);
 }
 
 TEST(InputTests, NonDigitSymbolsInputNonHexadermicalLead) {
-    uint256_t a = dap_chain_balance_scan("hhh123");
+    uint256_t a = dap_uint256_scan_uninteger("hhh123");
 
     check_equality256(a, 0);
 }
 
 TEST(InputTests, NonDigitSymbolsInputNonHexadermicalTail) {
-    uint256_t a = dap_chain_balance_scan("11579208923731619542357098500868790785326998466564056403945758400791312963993q");
+    uint256_t a = dap_uint256_scan_uninteger("11579208923731619542357098500868790785326998466564056403945758400791312963993q");
 
     check_equality256(a, 0);
 }
 
 
 TEST(InputTests, LeadingZeroesOne) {
-    uint256_t a = dap_chain_balance_scan("01");
+    uint256_t a = dap_uint256_scan_uninteger("01");
 
     check_equality256(a, 1);
 }
 
 TEST(InputTests, LeadingZeroesMany) {
-    uint256_t a = dap_chain_balance_scan("0000000001");
+    uint256_t a = dap_uint256_scan_uninteger("0000000001");
 
     check_equality256(a, 1);
 }
 
 TEST(InputTests, LeadingZeroesAlot) {
     //exactly 78
-    uint256_t a = dap_chain_balance_scan("000000000000000000000000000000000000000000000000000000000000000000000000000001");
+    uint256_t a = dap_uint256_scan_uninteger("000000000000000000000000000000000000000000000000000000000000000000000000000001");
 
     check_equality256(a, 1);
 }
 
 TEST(InputTests, ScientificInputSimplePlus) {
-    uint256_t a = dap_chain_balance_scan("1.0e+10");
+    uint256_t a = dap_uint256_scan_uninteger("1.0e+10");
 
     check_equality256(a, 10000000000);
 }
 
 TEST(InputTests, ScientificInputSimple) {
-    uint256_t a = dap_chain_balance_scan("1.0e10");
+    uint256_t a = dap_uint256_scan_uninteger("1.0e10");
 
     check_equality256(a, 10000000000);
 }
 
 TEST(InputTests, ScientificInputSimpleCapital) {
-    uint256_t a = dap_chain_balance_scan("1.0E+10");
+    uint256_t a = dap_uint256_scan_uninteger("1.0E+10");
 
     check_equality256(a, 10000000000);
 }
@@ -297,7 +297,7 @@ TEST(InputTests, ScientificInputSimpleCapital) {
 TEST(DISABLED_InputTests, ScientificInputSimpleNotImportantZeroes) {
     //todo: turn this on, when we can handle this
 
-    uint256_t a = dap_chain_balance_scan("1.23456789000000e9");
+    uint256_t a = dap_uint256_scan_uninteger("1.23456789000000e9");
 
 
     check_equality256(a, 1234567890);
@@ -305,139 +305,139 @@ TEST(DISABLED_InputTests, ScientificInputSimpleNotImportantZeroes) {
 
 TEST(DISABLED_InputTests, ScientificInputSimpleNotImportantZeroesAtAll) {
 
-    uint256_t a = dap_chain_balance_scan("1.234000000000000000000000000000e+3");
+    uint256_t a = dap_uint256_scan_uninteger("1.234000000000000000000000000000e+3");
 
     check_equality256(a, 1234);
 }
 
 TEST(InputTests, ScientificInputSimpleMax64) {
-    uint256_t a = dap_chain_balance_scan("1.8446744073709551615e19");
+    uint256_t a = dap_uint256_scan_uninteger("1.8446744073709551615e19");
 
     check_equality256(a, 0xffffffffffffffff);
 }
 
 TEST(InputTests, ScientificInputSimpleMax64Plus) {
-    uint256_t a = dap_chain_balance_scan("1.8446744073709551615e+19");
+    uint256_t a = dap_uint256_scan_uninteger("1.8446744073709551615e+19");
 
     check_equality256(a, 0xffffffffffffffff);
 }
 
 TEST(InputTests, ScientificInputSimpleMin128) {
-    uint256_t a = dap_chain_balance_scan("1.8446744073709551616e19");
+    uint256_t a = dap_uint256_scan_uninteger("1.8446744073709551616e19");
 
     check_equality256(a, MIN128STR);
 }
 
 TEST(InputTests, ScientificIncputSimpleMin128Plus) {
-    uint256_t a = dap_chain_balance_scan("1.8446744073709551616e+19");
+    uint256_t a = dap_uint256_scan_uninteger("1.8446744073709551616e+19");
 
     check_equality256(a, MIN128STR);
 }
 
 TEST(InputTests, ScientificInputSimple128Max) {
-    uint256_t a = dap_chain_balance_scan("3.40282366920938463463374607431768211455e38");
+    uint256_t a = dap_uint256_scan_uninteger("3.40282366920938463463374607431768211455e38");
 
     check_equality256(a, MAX128STR);
 }
 
 TEST(InputTests, ScientificInputSimple256Min) {
-    uint256_t a = dap_chain_balance_scan("3.40282366920938463463374607431768211456e38");
+    uint256_t a = dap_uint256_scan_uninteger("3.40282366920938463463374607431768211456e38");
 
     check_equality256(a, MIN256STR);
 }
 
 TEST(InputTests, ScientificInputSimple256Max) {
-    uint256_t a = dap_chain_balance_scan("1.15792089237316195423570985008687907853269984665640564039457584007913129639935e77");
+    uint256_t a = dap_uint256_scan_uninteger("1.15792089237316195423570985008687907853269984665640564039457584007913129639935e77");
 
     check_equality256(a, MAX256STR);
 }
 
 TEST(InputTests, ScientificInputSimple256MaxPlus) {
-    uint256_t a = dap_chain_balance_scan("1.15792089237316195423570985008687907853269984665640564039457584007913129639935e+77");
+    uint256_t a = dap_uint256_scan_uninteger("1.15792089237316195423570985008687907853269984665640564039457584007913129639935e+77");
 
     check_equality256(a, MAX256STR);
 }
 
 TEST(InputTests, ScientificInputSimpleLessThanOne) {
-    uint256_t a = dap_chain_balance_scan("0.1e1");
+    uint256_t a = dap_uint256_scan_uninteger("0.1e1");
 
     check_equality256(a, 1);
 }
 
 TEST(InputTests, ScientificInputSimpleMoreThanTwo) {
-    uint256_t a = dap_chain_balance_scan("123.123e3");
+    uint256_t a = dap_uint256_scan_uninteger("123.123e3");
 
     check_equality256(a, 123123);
 }
 
 TEST(InputTests, ScientificInputSimpleMaxAndMoreThanTwo) {
-    uint256_t a = dap_chain_balance_scan("11579208923731619542357098500868790785326998466564056403945758400791.3129639935e10");
+    uint256_t a = dap_uint256_scan_uninteger("11579208923731619542357098500868790785326998466564056403945758400791.3129639935e10");
 
     check_equality256(a, MAX256STR);
 }
 
 TEST(InputTests, IncorrectScientificInputMorePluses) {
-    uint256_t a = dap_chain_balance_scan("1.0E+++10");
+    uint256_t a = dap_uint256_scan_uninteger("1.0E+++10");
 
     check_equality256(a, 0);
 }
 
 TEST(InputTests, IncorrectScientificInputMoreExps) {
-    uint256_t a = dap_chain_balance_scan("1.0EEE+10");
+    uint256_t a = dap_uint256_scan_uninteger("1.0EEE+10");
 
     check_equality256(a, 0);
 }
 
 TEST(InputTests, IncorrectScientificInputMoreDots) {
-    uint256_t a = dap_chain_balance_scan("1.1.1e3");
+    uint256_t a = dap_uint256_scan_uninteger("1.1.1e3");
 
     check_equality256(a, 0);
 }
 
 TEST(InputTests, IncorrectScientificInputFractionPart){
     // with fraction part
-    uint256_t a = dap_chain_balance_scan("1.123e2");
+    uint256_t a = dap_uint256_scan_uninteger("1.123e2");
 
     check_equality256(a, 0);
 }
 
 TEST(InputTests, TooLongScientificInputOneSymb) {
     //one symbol more
-    uint256_t a = dap_chain_balance_scan("1.157920892373161954235709850086879078532699846656405640394575840079131296399356e+78");
+    uint256_t a = dap_uint256_scan_uninteger("1.157920892373161954235709850086879078532699846656405640394575840079131296399356e+78");
 
     check_equality256(a, 0);
 }
 
 TEST(InputTests, TooLongScientificInputTenSymbs) {
     //ten symbols more
-    uint256_t a = dap_chain_balance_scan("1.157920892373161954235709850086879078532699846656405640394575840079131296399351234567890e+88");
+    uint256_t a = dap_uint256_scan_uninteger("1.157920892373161954235709850086879078532699846656405640394575840079131296399351234567890e+88");
 
     check_equality256(a, 0);
 }
 
 
-//todo: make some more tests for better coverage (see coverage on dap_chain_balance_scan)
+//todo: make some more tests for better coverage (see coverage on dap_uint256_scan_uninteger)
 TEST(InputTests, OverflowScientificInputBigExp) {
-     uint256_t a = dap_chain_balance_scan("1.0e100");
+     uint256_t a = dap_uint256_scan_uninteger("1.0e100");
 
     check_equality256(a, 0);
 }
 
 TEST(InputTests, OverflowScientificInputOneBit) {
     //last symb changed
-    uint256_t a = dap_chain_balance_scan("1.15792089237316195423570985008687907853269984665640564039457584007913129639936e+77");
+    uint256_t a = dap_uint256_scan_uninteger("1.15792089237316195423570985008687907853269984665640564039457584007913129639936e+77");
 
     check_equality256(a, 0);
 }
 
 TEST(InputTests, OverflowScientificInputHighBit) {
-    uint256_t a = dap_chain_balance_scan("1.25792089237316195423570985008687907853269984665640564039457584007913129639935e+77");
+    uint256_t a = dap_uint256_scan_uninteger("1.25792089237316195423570985008687907853269984665640564039457584007913129639935e+77");
 
     check_equality256(a, 0);
 }
 
 TEST(InputTests, OverflowScientificInputHighBit2) {
-    uint256_t a = dap_chain_balance_scan("2.15792089237316195423570985008687907853269984665640564039457584007913129639935e+77");
+    uint256_t a = dap_uint256_scan_uninteger("2.15792089237316195423570985008687907853269984665640564039457584007913129639935e+77");
 
     check_equality256(a, 0);
 }
@@ -476,45 +476,45 @@ TEST_F(DISABLED_RandomInputTestsCoins, CoinsBase) {
 //
 //    uint256_t a = dap_chain_coins_to_balance(b.str().c_str());
 //
-//    ASSERT_STREQ(dap_chain_balance_to_coins(a), b.str().c_str());
+//    ASSERT_STREQ(dap_uint256_decimal_to_char(a), b.str().c_str());
 }
 
 
 TEST(OutputTests, ZeroOutputBase) {
     uint256_t zero = uint256_0;
-    ASSERT_STREQ(dap_chain_balance_print(zero), "0");
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(zero), "0");
 }
 
 TEST(OutputTests, Max64Output) {
     uint256_t max = GET_256_FROM_64(0xffffffffffffffff);
-    ASSERT_STREQ(dap_chain_balance_print(max), "18446744073709551615");
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(max), "18446744073709551615");
 }
 
 TEST(OutputTests, Min128Output) {
-    uint256_t min = dap_chain_balance_scan("18446744073709551616");
-    ASSERT_STREQ(dap_chain_balance_print(min), "18446744073709551616");
+    uint256_t min = dap_uint256_scan_uninteger("18446744073709551616");
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(min), "18446744073709551616");
 }
 
 TEST(OutputTests, Max128Output) {
-    uint256_t max = dap_chain_balance_scan("340282366920938463463374607431768211455");
-    ASSERT_STREQ(dap_chain_balance_print(max), "340282366920938463463374607431768211455");
+    uint256_t max = dap_uint256_scan_uninteger("340282366920938463463374607431768211455");
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(max), "340282366920938463463374607431768211455");
 }
 
 TEST(OutputTests, Min256Output) {
-    uint256_t min = dap_chain_balance_scan("340282366920938463463374607431768211456");
-    ASSERT_STREQ(dap_chain_balance_print(min), "340282366920938463463374607431768211456");
+    uint256_t min = dap_uint256_scan_uninteger("340282366920938463463374607431768211456");
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(min), "340282366920938463463374607431768211456");
 }
 
 TEST(OutputTests, Max256Output) {
-    uint256_t max = dap_chain_balance_scan("115792089237316195423570985008687907853269984665640564039457584007913129639935");
-    ASSERT_STREQ(dap_chain_balance_print(max), "115792089237316195423570985008687907853269984665640564039457584007913129639935");
+    uint256_t max = dap_uint256_scan_uninteger("115792089237316195423570985008687907853269984665640564039457584007913129639935");
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(max), "115792089237316195423570985008687907853269984665640564039457584007913129639935");
 }
 
 TEST_F(RandomOutputTests, Output256){
     bmp::uint256_t boost_a(gen256());
 
-    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
-    ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+    uint256_t a = dap_uint256_scan_uninteger(boost_a.str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(a), boost_a.str().c_str());
 }
 
 TEST(InputTests, Get256From128) {
@@ -526,7 +526,7 @@ TEST(InputTests, Get256From128) {
 TEST_F(RandomInputTests, Input256) {
     bmp::uint256_t boost_a(gen256());
 
-    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+    uint256_t a = dap_uint256_scan_uninteger(boost_a.str().c_str());
     check_equality256(a, boost_a);
 }
 
@@ -570,7 +570,7 @@ TEST(ComparisonTests, Equal256ZeroOne) {
 TEST(ComparisonTests, Equal256Min128Zero) {
     uint256_t a, b;
 
-    a = dap_chain_balance_scan(MIN128STR);
+    a = dap_uint256_scan_uninteger(MIN128STR);
     b = GET_256_FROM_64(0);
 
     ASSERT_FALSE(EQUAL_256(a, b));
@@ -579,8 +579,8 @@ TEST(ComparisonTests, Equal256Min128Zero) {
 TEST(ComparisonTests, Equal256Max64Min128) {
     uint256_t a, b;
 
-    a = dap_chain_balance_scan(MIN128STR);
-    b = dap_chain_balance_scan(MAX64STR);
+    a = dap_uint256_scan_uninteger(MIN128STR);
+    b = dap_uint256_scan_uninteger(MAX64STR);
 
     ASSERT_FALSE(EQUAL_256(a, b));
 }
@@ -588,8 +588,8 @@ TEST(ComparisonTests, Equal256Max64Min128) {
 TEST(ComparisonTests, Equal256Min128Min128) {
     uint256_t a, b;
 
-    a = dap_chain_balance_scan(MIN128STR);
-    b = dap_chain_balance_scan(MIN128STR);
+    a = dap_uint256_scan_uninteger(MIN128STR);
+    b = dap_uint256_scan_uninteger(MIN128STR);
 
     ASSERT_TRUE(EQUAL_256(a, b));
 }
@@ -597,8 +597,8 @@ TEST(ComparisonTests, Equal256Min128Min128) {
 TEST(ComparisonTests, Equal256Max128Min128){
     uint256_t a, b;
 
-    a = dap_chain_balance_scan(MAX128STR);
-    b = dap_chain_balance_scan(MIN128STR);
+    a = dap_uint256_scan_uninteger(MAX128STR);
+    b = dap_uint256_scan_uninteger(MIN128STR);
 
     ASSERT_FALSE(EQUAL_256(a, b));
 }
@@ -606,8 +606,8 @@ TEST(ComparisonTests, Equal256Max128Min128){
 TEST(ComparisonTests, Equal256Max128Min256) {
     uint256_t a, b;
 
-    a = dap_chain_balance_scan(MAX128STR);
-    b = dap_chain_balance_scan(MIN256STR);
+    a = dap_uint256_scan_uninteger(MAX128STR);
+    b = dap_uint256_scan_uninteger(MIN256STR);
 
     ASSERT_FALSE(EQUAL_256(a, b));
 
@@ -616,8 +616,8 @@ TEST(ComparisonTests, Equal256Max128Min256) {
 TEST(ComparisonTests, Equal256Max256Min256) {
     uint256_t a, b;
 
-    a = dap_chain_balance_scan(MAX256STR);
-    b = dap_chain_balance_scan(MIN256STR);
+    a = dap_uint256_scan_uninteger(MAX256STR);
+    b = dap_uint256_scan_uninteger(MIN256STR);
 
     ASSERT_FALSE(EQUAL_256(a, b));
 }
@@ -625,8 +625,8 @@ TEST(ComparisonTests, Equal256Max256Min256) {
 TEST(ComparisonTests, Equal256Max256Max256) {
     uint256_t a, b;
 
-    a = dap_chain_balance_scan(MAX256STR);
-    b = dap_chain_balance_scan(MAX256STR);
+    a = dap_uint256_scan_uninteger(MAX256STR);
+    b = dap_uint256_scan_uninteger(MAX256STR);
 
     ASSERT_TRUE(EQUAL_256(a, b));
 }
@@ -634,8 +634,8 @@ TEST(ComparisonTests, Equal256Max256Max256) {
 TEST(ComparisonTests, Equal256Max256Zero) {
     uint256_t a, b;
 
-    a = dap_chain_balance_scan(MAX256STR);
-    b = dap_chain_balance_scan("0");
+    a = dap_uint256_scan_uninteger(MAX256STR);
+    b = dap_uint256_scan_uninteger("0");
 
     ASSERT_FALSE(EQUAL_256(a, b));
 }
@@ -643,8 +643,8 @@ TEST(ComparisonTests, Equal256Max256Zero) {
 TEST_F(RandomComparisonTests, Equal256) {
     bmp::uint256_t boost_a(gen128());
 
-    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
-    uint256_t b = dap_chain_balance_scan(boost_a.str().c_str());
+    uint256_t a = dap_uint256_scan_uninteger(boost_a.str().c_str());
+    uint256_t b = dap_uint256_scan_uninteger(boost_a.str().c_str());
 
     ASSERT_TRUE(EQUAL_256(a, b));
 }
@@ -722,19 +722,19 @@ TEST(ComparisonTests, IsZeroTest256FalseChangedHi){
 }
 
 TEST(ComparisonTests, IsZeroTest256TrueFromBalance) {
-    uint256_t a = dap_chain_balance_scan("0");
+    uint256_t a = dap_uint256_scan_uninteger("0");
 
     ASSERT_TRUE(IS_ZERO_256(a));
 }
 
 TEST(ComparisonTests, IsZeroTest256FalseFromBalanceMax128) {
-    uint256_t a = dap_chain_balance_scan(MAX128STR);
+    uint256_t a = dap_uint256_scan_uninteger(MAX128STR);
 
     ASSERT_FALSE(IS_ZERO_256(a));
 }
 
 TEST(ComparisonTests, IsZeroTest256FalseFromBalanceMax256) {
-    uint256_t a = dap_chain_balance_scan(MAX256STR);
+    uint256_t a = dap_uint256_scan_uninteger(MAX256STR);
 
     ASSERT_FALSE(IS_ZERO_256(a));
 }
@@ -742,7 +742,7 @@ TEST(ComparisonTests, IsZeroTest256FalseFromBalanceMax256) {
 TEST_F(RandomComparisonTests, IsZeroTest) {
     bmp::uint256_t boost_a(gen256());
 
-    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+    uint256_t a = dap_uint256_scan_uninteger(boost_a.str().c_str());
 
     if (boost_a == 0) {
         ASSERT_TRUE(IS_ZERO_256(a));
@@ -810,8 +810,8 @@ TEST(BitTests, And256ZeroZero) {
     uint256_t c;
 
     //todo: shuld we use ASSERT_EQ with lo and hi? It would be bad for 32-bit only systems
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, a)), dap_chain_balance_print(uint256_0));
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, a)), dap_chain_balance_print(uint256_0));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(a, a)), dap_uint256_uninteger_to_char(uint256_0));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(a, a)), dap_uint256_uninteger_to_char(uint256_0));
 }
 
 TEST(BitTests, And256ZeroOne) {
@@ -820,8 +820,8 @@ TEST(BitTests, And256ZeroOne) {
     b = uint256_1;
     c = uint256_0;
 
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(uint256_0));
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(uint256_0));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(a, b)), dap_uint256_uninteger_to_char(uint256_0));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(b, a)), dap_uint256_uninteger_to_char(uint256_0));
 
 }
 
@@ -831,110 +831,110 @@ TEST(BitTests, And256OneOne) {
     b = uint256_1;
     c = uint256_0;
 
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(uint256_1));
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(uint256_1));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(a, b)), dap_uint256_uninteger_to_char(uint256_1));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(b, a)), dap_uint256_uninteger_to_char(uint256_1));
 }
 
 TEST(BitTests, And256Max64Zebra) {
     uint256_t a, b,c;
 
 
-    a = dap_chain_balance_scan(MAX64STR);               //0b1111111111111111111111111111111111111111111111111111111111111111
-    b = dap_chain_balance_scan("12297829382473034410"); //0b1010101010101010101010101010101010101010101010101010101010101010
+    a = dap_uint256_scan_uninteger(MAX64STR);               //0b1111111111111111111111111111111111111111111111111111111111111111
+    b = dap_uint256_scan_uninteger("12297829382473034410"); //0b1010101010101010101010101010101010101010101010101010101010101010
     c = b; //0b1010101010101010101010101010101010101010101010101010101010101010
 
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(c));
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(a, b)), dap_uint256_uninteger_to_char(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(b, a)), dap_uint256_uninteger_to_char(c));
 }
 
 TEST(BitTests, And256Max64Halves) {
     uint256_t a, b,c;
 
-    a = dap_chain_balance_scan(MAX64STR);               //0b1111111111111111111111111111111111111111111111111111111111111111
-    b = dap_chain_balance_scan("18446744069414584320");             //0b1111111111111111111111111111111100000000000000000000000000000000
+    a = dap_uint256_scan_uninteger(MAX64STR);               //0b1111111111111111111111111111111111111111111111111111111111111111
+    b = dap_uint256_scan_uninteger("18446744069414584320");             //0b1111111111111111111111111111111100000000000000000000000000000000
     c = b;             //0b1111111111111111111111111111111100000000000000000000000000000000
 
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(c));
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(a, b)), dap_uint256_uninteger_to_char(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(b, a)), dap_uint256_uninteger_to_char(c));
 }
 
 
 TEST(BitTests, And256Max64DiffHalves) {
     uint256_t a, b,c;
 
-    a = dap_chain_balance_scan("18446744069414584320");             //0b1111111111111111111111111111111100000000000000000000000000000000
-    b = dap_chain_balance_scan("4294967295");                       //0b0000000000000000000000000000000011111111111111111111111111111111
+    a = dap_uint256_scan_uninteger("18446744069414584320");             //0b1111111111111111111111111111111100000000000000000000000000000000
+    b = dap_uint256_scan_uninteger("4294967295");                       //0b0000000000000000000000000000000011111111111111111111111111111111
     c = uint256_0;
 
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(c));
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(a, b)), dap_uint256_uninteger_to_char(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(b, a)), dap_uint256_uninteger_to_char(c));
 }
 
 
 TEST(BitTests, And256Max128Zebra ) {
     uint256_t a, b,c;
 
-    a = dap_chain_balance_scan(MAX128STR);                                             //0b11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
-    b = dap_chain_balance_scan("226854911280625642308916404954512140970");             //0b10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
+    a = dap_uint256_scan_uninteger(MAX128STR);                                             //0b11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+    b = dap_uint256_scan_uninteger("226854911280625642308916404954512140970");             //0b10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
     c = b;                                                                                      //0b10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
 
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(c));
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(a, b)), dap_uint256_uninteger_to_char(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(b, a)), dap_uint256_uninteger_to_char(c));
 }
 
 TEST(BitTests, And256Max128Quarters) {
     uint256_t a, b,c;
 
-    a = dap_chain_balance_scan(MAX128STR);                                             //0b11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
-    b = dap_chain_balance_scan("340282366841710300967557013907638845440");             //0b11111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000
+    a = dap_uint256_scan_uninteger(MAX128STR);                                             //0b11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+    b = dap_uint256_scan_uninteger("340282366841710300967557013907638845440");             //0b11111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000
     c = b;                                                                                       //0b11111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000
 
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(c));
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(a, b)), dap_uint256_uninteger_to_char(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(b, a)), dap_uint256_uninteger_to_char(c));
 }
 
 TEST(BitTests, And256Max128Halves) {
     uint256_t a, b,c;
-    a = dap_chain_balance_scan(MAX128STR);                                             //0b11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
-    b = dap_chain_balance_scan("340282366920938463444927863358058659840");              //0b11111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000
+    a = dap_uint256_scan_uninteger(MAX128STR);                                             //0b11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+    b = dap_uint256_scan_uninteger("340282366920938463444927863358058659840");              //0b11111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000
     c = b;
 
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(c));
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(a, b)), dap_uint256_uninteger_to_char(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(b, a)), dap_uint256_uninteger_to_char(c));
 }
 
 //TODO: add other tests, like diff halves
 
 TEST(BitTests, And256Max256Zebra) {
     uint256_t a, b,c;
-    a = dap_chain_balance_scan(MAX256STR);                                             //0b1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
-    b = dap_chain_balance_scan("77194726158210796949047323339125271902179989777093709359638389338608753093290");             //0b10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
+    a = dap_uint256_scan_uninteger(MAX256STR);                                             //0b1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+    b = dap_uint256_scan_uninteger("77194726158210796949047323339125271902179989777093709359638389338608753093290");             //0b10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
     c = b;                                                                                      //0b10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
 
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(c));
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(a, b)), dap_uint256_uninteger_to_char(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(b, a)), dap_uint256_uninteger_to_char(c));
 }
 
 TEST(BitTests, And256Max256Octets) {
     uint256_t a, b,c;
 
-    a = dap_chain_balance_scan(MAX256STR);                                             //0b1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
-    b = dap_chain_balance_scan("115792089210356248762697446947946071893095522863849111501270640965525260206080");             //0b1111111111111111111111111111111100000000000000000000000000000000111111111111111111111111111111110000000000000000000000000000000011111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000
+    a = dap_uint256_scan_uninteger(MAX256STR);                                             //0b1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+    b = dap_uint256_scan_uninteger("115792089210356248762697446947946071893095522863849111501270640965525260206080");             //0b1111111111111111111111111111111100000000000000000000000000000000111111111111111111111111111111110000000000000000000000000000000011111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000
     c = b;                                                                                       //0b1111111111111111111111111111111100000000000000000000000000000000111111111111111111111111111111110000000000000000000000000000000011111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000
 
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(c));
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(a, b)), dap_uint256_uninteger_to_char(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(b, a)), dap_uint256_uninteger_to_char(c));
 }
 
 TEST(BitTests, And256Max256Quarters) {
     uint256_t a, b,c;
 
-    a = dap_chain_balance_scan(MAX256STR);                                             //0b1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
-    b = dap_chain_balance_scan("115792089237316195417293883273301227089774477609353836086800156426807153786880");              //0b1111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000
+    a = dap_uint256_scan_uninteger(MAX256STR);                                             //0b1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+    b = dap_uint256_scan_uninteger("115792089237316195417293883273301227089774477609353836086800156426807153786880");              //0b1111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000
     c = b;
 
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), dap_chain_balance_print(c));
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(b, a)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(a, b)), dap_uint256_uninteger_to_char(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(b, a)), dap_uint256_uninteger_to_char(c));
 }
 
 //TODO: add other tests, like halves and diff halves
@@ -946,71 +946,71 @@ TEST(BitTests, Or256) {
 
 
     //todo: should we use ASSERT_EQ with lo and hi? It would be bad for 32-bit only systems
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), dap_chain_balance_print(uint256_1));
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, a)), dap_chain_balance_print(uint256_1));
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, a)), dap_chain_balance_print(uint256_0));
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, b)), dap_chain_balance_print(uint256_1));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(a, b)), dap_uint256_uninteger_to_char(uint256_1));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(b, a)), dap_uint256_uninteger_to_char(uint256_1));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(a, a)), dap_uint256_uninteger_to_char(uint256_0));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(b, b)), dap_uint256_uninteger_to_char(uint256_1));
 
-    a = dap_chain_balance_scan(MAX64STR);               //0b1111111111111111111111111111111111111111111111111111111111111111
-    b = dap_chain_balance_scan("12297829382473034410"); //0b1010101010101010101010101010101010101010101010101010101010101010
+    a = dap_uint256_scan_uninteger(MAX64STR);               //0b1111111111111111111111111111111111111111111111111111111111111111
+    b = dap_uint256_scan_uninteger("12297829382473034410"); //0b1010101010101010101010101010101010101010101010101010101010101010
     c = a; //0b1111111111111111111111111111111111111111111111111111111111111111
 
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), dap_chain_balance_print(c));
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, a)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(a, b)), dap_uint256_uninteger_to_char(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(b, a)), dap_uint256_uninteger_to_char(c));
 
-    b = dap_chain_balance_scan("18446744069414584320");             //0b1111111111111111111111111111111100000000000000000000000000000000
+    b = dap_uint256_scan_uninteger("18446744069414584320");             //0b1111111111111111111111111111111100000000000000000000000000000000
     c = a;             //0b1111111111111111111111111111111111111111111111111111111111111111
 
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), dap_chain_balance_print(c));
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, a)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(a, b)), dap_uint256_uninteger_to_char(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(b, a)), dap_uint256_uninteger_to_char(c));
 
-    a = dap_chain_balance_scan("18446744069414584320");             //0b1111111111111111111111111111111100000000000000000000000000000000
-    b = dap_chain_balance_scan("4294967295");                       //0b0000000000000000000000000000000011111111111111111111111111111111
-    c = dap_chain_balance_scan(MAX64STR); //0b1111111111111111111111111111111111111111111111111111111111111111
+    a = dap_uint256_scan_uninteger("18446744069414584320");             //0b1111111111111111111111111111111100000000000000000000000000000000
+    b = dap_uint256_scan_uninteger("4294967295");                       //0b0000000000000000000000000000000011111111111111111111111111111111
+    c = dap_uint256_scan_uninteger(MAX64STR); //0b1111111111111111111111111111111111111111111111111111111111111111
 
 
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), dap_chain_balance_print(c));
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, a)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(a, b)), dap_uint256_uninteger_to_char(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(b, a)), dap_uint256_uninteger_to_char(c));
 
 
-    a = dap_chain_balance_scan(MAX128STR);                                             //0b11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
-    b = dap_chain_balance_scan("226854911280625642308916404954512140970");             //0b10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
+    a = dap_uint256_scan_uninteger(MAX128STR);                                             //0b11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+    b = dap_uint256_scan_uninteger("226854911280625642308916404954512140970");             //0b10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
     c = a;                                                                                      //0b11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
 
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), dap_chain_balance_print(c));
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, a)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(a, b)), dap_uint256_uninteger_to_char(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(b, a)), dap_uint256_uninteger_to_char(c));
 
-    b = dap_chain_balance_scan("340282366841710300967557013907638845440");             //0b11111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000
+    b = dap_uint256_scan_uninteger("340282366841710300967557013907638845440");             //0b11111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000
     c = a;                                                                                       //0b11111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000
 
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), dap_chain_balance_print(c));
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, a)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(a, b)), dap_uint256_uninteger_to_char(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(b, a)), dap_uint256_uninteger_to_char(c));
 
 
-    b = dap_chain_balance_scan("340282366920938463444927863358058659840");              //0b11111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000
+    b = dap_uint256_scan_uninteger("340282366920938463444927863358058659840");              //0b11111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000
     c = a;
 
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), dap_chain_balance_print(c));
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, a)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(a, b)), dap_uint256_uninteger_to_char(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(b, a)), dap_uint256_uninteger_to_char(c));
 
-    a = dap_chain_balance_scan(MAX256STR);                                             //0b1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
-    b = dap_chain_balance_scan("77194726158210796949047323339125271902179989777093709359638389338608753093290");             //0b10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
+    a = dap_uint256_scan_uninteger(MAX256STR);                                             //0b1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+    b = dap_uint256_scan_uninteger("77194726158210796949047323339125271902179989777093709359638389338608753093290");             //0b10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
     c = a;                                                                                      //0b1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
 
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), dap_chain_balance_print(c));
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, a)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(a, b)), dap_uint256_uninteger_to_char(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(b, a)), dap_uint256_uninteger_to_char(c));
 
-    b = dap_chain_balance_scan("115792089210356248762697446947946071893095522863849111501270640965525260206080");             //0b1111111111111111111111111111111100000000000000000000000000000000111111111111111111111111111111110000000000000000000000000000000011111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000
+    b = dap_uint256_scan_uninteger("115792089210356248762697446947946071893095522863849111501270640965525260206080");             //0b1111111111111111111111111111111100000000000000000000000000000000111111111111111111111111111111110000000000000000000000000000000011111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000
     c = a;                                                                                       //0b1111111111111111111111111111111100000000000000000000000000000000111111111111111111111111111111110000000000000000000000000000000011111111111111111111111111111111000000000000000000000000000000001111111111111111111111111111111100000000000000000000000000000000
 
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), dap_chain_balance_print(c));
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, a)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(a, b)), dap_uint256_uninteger_to_char(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(b, a)), dap_uint256_uninteger_to_char(c));
 
-    b = dap_chain_balance_scan("115792089237316195417293883273301227089774477609353836086800156426807153786880");              //0b1111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000
+    b = dap_uint256_scan_uninteger("115792089237316195417293883273301227089774477609353836086800156426807153786880");              //0b1111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000
     c = a;
 
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), dap_chain_balance_print(c));
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(b, a)), dap_chain_balance_print(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(a, b)), dap_uint256_uninteger_to_char(c));
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(b, a)), dap_uint256_uninteger_to_char(c));
 
 
 
@@ -1021,79 +1021,79 @@ TEST(BitTests, CycleShifts) {
     uint256_t a = uint256_1;
 
     for (int i = 0; i < 256; i++) {
-        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        ASSERT_STREQ(dap_uint256_uninteger_to_char(a), boost_a.str().c_str());
         LEFT_SHIFT_256(a, &a, 1);
         boost_a <<= 1;
     }
 
     boost_a = 2;
-    a = dap_chain_balance_scan("2");
+    a = dap_uint256_scan_uninteger("2");
 
     for (int i = 0; i < 256; i++) {
-        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        ASSERT_STREQ(dap_uint256_uninteger_to_char(a), boost_a.str().c_str());
         LEFT_SHIFT_256(a, &a, 1);
         boost_a <<= 1;
     }
 
     boost_a = 3;
-    a = dap_chain_balance_scan("3");
+    a = dap_uint256_scan_uninteger("3");
 
     for (int i = 0; i < 256; i++) {
-        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        ASSERT_STREQ(dap_uint256_uninteger_to_char(a), boost_a.str().c_str());
         LEFT_SHIFT_256(a, &a, 1);
         boost_a <<= 1;
     }
 
     boost_a = 7;
-    a = dap_chain_balance_scan("7");
+    a = dap_uint256_scan_uninteger("7");
 
     for (int i = 0; i < 256; i++) {
-        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        ASSERT_STREQ(dap_uint256_uninteger_to_char(a), boost_a.str().c_str());
         LEFT_SHIFT_256(a, &a, 1);
         boost_a <<= 1;
     }
 
     boost_a = 9;
-    a = dap_chain_balance_scan("9");
+    a = dap_uint256_scan_uninteger("9");
 
     for (int i = 0; i < 256; i++) {
-        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        ASSERT_STREQ(dap_uint256_uninteger_to_char(a), boost_a.str().c_str());
         LEFT_SHIFT_256(a, &a, 1);
         boost_a <<= 1;
     }
 
     boost_a = bmp::uint256_t(MAX256STR);
-    a = dap_chain_balance_scan(MAX256STR);
+    a = dap_uint256_scan_uninteger(MAX256STR);
 
     for (int i = 0; i<256; i++) {
-        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        ASSERT_STREQ(dap_uint256_uninteger_to_char(a), boost_a.str().c_str());
         LEFT_SHIFT_256(a, &a, 1);
         boost_a <<= 1;
     }
 
     boost_a = bmp::uint256_t(MAX256STR);
-    a = dap_chain_balance_scan(MAX256STR);
+    a = dap_uint256_scan_uninteger(MAX256STR);
 
     for (int i = 0; i<256; i++) {
-        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        ASSERT_STREQ(dap_uint256_uninteger_to_char(a), boost_a.str().c_str());
         RIGHT_SHIFT_256(a, &a, 1);
         boost_a >>= 1;
     }
 
     boost_a = bmp::uint256_t("57896044618658097711785492504343953926634992332820282019728792003956564819968"); //0b10...0
-    a = dap_chain_balance_scan("57896044618658097711785492504343953926634992332820282019728792003956564819968");
+    a = dap_uint256_scan_uninteger("57896044618658097711785492504343953926634992332820282019728792003956564819968");
 
     for (int i = 0; i<256; i++) {
-        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        ASSERT_STREQ(dap_uint256_uninteger_to_char(a), boost_a.str().c_str());
         RIGHT_SHIFT_256(a, &a, 1);
         boost_a >>= 1;
     }
 
     boost_a = bmp::uint256_t("86844066927987146567678238756515930889952488499230423029593188005934847229952"); //0b110...0
-    a = dap_chain_balance_scan("86844066927987146567678238756515930889952488499230423029593188005934847229952");
+    a = dap_uint256_scan_uninteger("86844066927987146567678238756515930889952488499230423029593188005934847229952");
 
     for (int i = 0; i<256; i++) {
-        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        ASSERT_STREQ(dap_uint256_uninteger_to_char(a), boost_a.str().c_str());
         RIGHT_SHIFT_256(a, &a, 1);
         boost_a >>= 1;
     }
@@ -1101,19 +1101,19 @@ TEST(BitTests, CycleShifts) {
 
 TEST_F(RandomBitTests, RandomShift) {
     bmp::uint256_t boost_a(gen256());
-    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+    uint256_t a = dap_uint256_scan_uninteger(boost_a.str().c_str());
 
     for (int i = 0; i<256; i++) {
-        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        ASSERT_STREQ(dap_uint256_uninteger_to_char(a), boost_a.str().c_str());
         RIGHT_SHIFT_256(a, &a, 1);
         boost_a >>= 1;
     }
 
     boost_a = bmp::uint256_t(gen128()); //only 128 bits
-    a = dap_chain_balance_scan(boost_a.str().c_str());
+    a = dap_uint256_scan_uninteger(boost_a.str().c_str());
 
     for (int i = 0; i<256; i++) {
-        ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+        ASSERT_STREQ(dap_uint256_uninteger_to_char(a), boost_a.str().c_str());
         LEFT_SHIFT_256(a, &a, 1);
         boost_a <<= 1;
     }
@@ -1121,42 +1121,42 @@ TEST_F(RandomBitTests, RandomShift) {
 
 TEST_F(RandomBitTests, RandomShiftNotOne) {
     bmp::uint256_t boost_a(gen256());
-    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+    uint256_t a = dap_uint256_scan_uninteger(boost_a.str().c_str());
 
     int sh = (int) gen128()%255;
 
     LEFT_SHIFT_256(a, &a, sh);
     boost_a <<= sh;
 
-    ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(a), boost_a.str().c_str());
 
     boost_a = bmp::uint256_t(gen256());
-    a = dap_chain_balance_scan(boost_a.str().c_str());
+    a = dap_uint256_scan_uninteger(boost_a.str().c_str());
 
     RIGHT_SHIFT_256(a, &a, sh);
     boost_a >>= sh;
 
-    ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(a), boost_a.str().c_str());
 }
 
 TEST_F(RandomBitTests, And) {
     bmp::uint256_t boost_a(gen256());
     bmp::uint256_t boost_b(gen256());
 
-    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
-    uint256_t b = dap_chain_balance_scan(boost_b.str().c_str());
+    uint256_t a = dap_uint256_scan_uninteger(boost_a.str().c_str());
+    uint256_t b = dap_uint256_scan_uninteger(boost_b.str().c_str());
 
-    ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), (boost_a & boost_b).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(a, b)), (boost_a & boost_b).str().c_str());
 }
 
 TEST_F(RandomBitTests, Or) {
     bmp::uint256_t boost_a(gen256());
     bmp::uint256_t boost_b(gen256());
 
-    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
-    uint256_t b = dap_chain_balance_scan(boost_b.str().c_str());
+    uint256_t a = dap_uint256_scan_uninteger(boost_a.str().c_str());
+    uint256_t b = dap_uint256_scan_uninteger(boost_b.str().c_str());
 
-    ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), (boost_a | boost_b).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(a, b)), (boost_a | boost_b).str().c_str());
 }
 
 
@@ -1164,11 +1164,11 @@ TEST_F(RandomBitTests, CiclycAnd) {
     bmp::uint256_t boost_a(gen256());
     bmp::uint256_t boost_b(gen256());
 
-    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
-    uint256_t b = dap_chain_balance_scan(boost_b.str().c_str());
+    uint256_t a = dap_uint256_scan_uninteger(boost_a.str().c_str());
+    uint256_t b = dap_uint256_scan_uninteger(boost_b.str().c_str());
 
     for (int i = 0; i<256; i++) {
-        ASSERT_STREQ(dap_chain_balance_print(AND_256(a, b)), (boost_a & boost_b).str().c_str());
+        ASSERT_STREQ(dap_uint256_uninteger_to_char(AND_256(a, b)), (boost_a & boost_b).str().c_str());
         RIGHT_SHIFT_256(a, &a, 1);
         RIGHT_SHIFT_256(b, &b, 1);
         boost_a >>= 1;
@@ -1180,11 +1180,11 @@ TEST_F(RandomBitTests, CiclycOr) {
     bmp::uint256_t boost_a(gen256());
     bmp::uint256_t boost_b(gen256());
 
-    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
-    uint256_t b = dap_chain_balance_scan(boost_b.str().c_str());
+    uint256_t a = dap_uint256_scan_uninteger(boost_a.str().c_str());
+    uint256_t b = dap_uint256_scan_uninteger(boost_b.str().c_str());
 
     for (int i = 0; i<256; i++) {
-        ASSERT_STREQ(dap_chain_balance_print(OR_256(a, b)), (boost_a | boost_b).str().c_str());
+        ASSERT_STREQ(dap_uint256_uninteger_to_char(OR_256(a, b)), (boost_a | boost_b).str().c_str());
         RIGHT_SHIFT_256(a, &a, 1);
         RIGHT_SHIFT_256(b, &b, 1);
         boost_a >>= 1;
@@ -1308,7 +1308,7 @@ TEST(BitTests, Incr256Two) {
 }
 
 TEST(BitTests, Incr256Max64) {
-    uint256_t a = dap_chain_balance_scan(MAX64STR);
+    uint256_t a = dap_uint256_scan_uninteger(MAX64STR);
 
     INCR_256(&a);
 
@@ -1326,35 +1326,35 @@ TEST(BitTests, Incr256Max64) {
 
 
 TEST(BitTests, Incr256Min128) {
-    uint256_t a = dap_chain_balance_scan(MIN128STR);
+    uint256_t a = dap_uint256_scan_uninteger(MIN128STR);
 
     INCR_256(&a);
 
-    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(MIN128STR)+1).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(a), (bmp::uint256_t(MIN128STR)+1).str().c_str());
 }
 
 TEST(BitTests, Incr256Max128) {
-    uint256_t a = dap_chain_balance_scan(MAX128STR);
+    uint256_t a = dap_uint256_scan_uninteger(MAX128STR);
 
     INCR_256(&a);
 
-    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(MAX128STR)+1).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(a), (bmp::uint256_t(MAX128STR)+1).str().c_str());
 }
 
 TEST(BitTests, Incr256Min256) {
-    uint256_t a = dap_chain_balance_scan(MIN256STR);
+    uint256_t a = dap_uint256_scan_uninteger(MIN256STR);
 
     INCR_256(&a);
 
-    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(MIN256STR)+1).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(a), (bmp::uint256_t(MIN256STR)+1).str().c_str());
 }
 
 TEST(BitTests, Incr256Max256) {
-    uint256_t a = dap_chain_balance_scan(MAX256STR);
+    uint256_t a = dap_uint256_scan_uninteger(MAX256STR);
 
     INCR_256(&a);
 
-    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(MAX256STR)+1).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(a), (bmp::uint256_t(MAX256STR)+1).str().c_str());
 }
 
 TEST(BitTests, Decr256One) {
@@ -1362,7 +1362,7 @@ TEST(BitTests, Decr256One) {
 
     DECR_256(&a);
 
-    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(0)-1).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(a), (bmp::uint256_t(0)-1).str().c_str());
 }
 
 TEST(BitTests, Decr256Two) {
@@ -1370,69 +1370,69 @@ TEST(BitTests, Decr256Two) {
 
     DECR_256(&a);
 
-    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(1)-1).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(a), (bmp::uint256_t(1)-1).str().c_str());
 
 }
 
 TEST(BitTests, Decr256Max64) {
-    uint256_t a = dap_chain_balance_scan(MAX64STR);
+    uint256_t a = dap_uint256_scan_uninteger(MAX64STR);
 
     DECR_256(&a);
 
-    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(MAX64STR)-1).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(a), (bmp::uint256_t(MAX64STR)-1).str().c_str());
 }
 
 
 TEST(BitTests, Decr256Min128) {
-    uint256_t a = dap_chain_balance_scan(MIN128STR);
+    uint256_t a = dap_uint256_scan_uninteger(MIN128STR);
 
     DECR_256(&a);
 
-    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(MIN128STR)-1).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(a), (bmp::uint256_t(MIN128STR)-1).str().c_str());
 }
 
 TEST(BitTests, Decr256Max128) {
-    uint256_t a = dap_chain_balance_scan(MAX128STR);
+    uint256_t a = dap_uint256_scan_uninteger(MAX128STR);
 
     DECR_256(&a);
 
-    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(MAX128STR)-1).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(a), (bmp::uint256_t(MAX128STR)-1).str().c_str());
 }
 
 TEST(BitTests, Decr256Min256) {
-    uint256_t a = dap_chain_balance_scan(MIN256STR);
+    uint256_t a = dap_uint256_scan_uninteger(MIN256STR);
 
     DECR_256(&a);
 
-    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(MIN256STR)-1).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(a), (bmp::uint256_t(MIN256STR)-1).str().c_str());
 }
 
 TEST(BitTests, Decr256Max256) {
-    uint256_t a = dap_chain_balance_scan(MAX256STR);
+    uint256_t a = dap_uint256_scan_uninteger(MAX256STR);
 
     DECR_256(&a);
 
-    ASSERT_STREQ(dap_chain_balance_print(a), (bmp::uint256_t(MAX256STR)-1).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(a), (bmp::uint256_t(MAX256STR)-1).str().c_str());
 }
 
 TEST_F(RandomBitTests, Incr256) {
     bmp::uint256_t boost_a(gen256());
-    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+    uint256_t a = dap_uint256_scan_uninteger(boost_a.str().c_str());
 
     boost_a++;
     INCR_256(&a);
 
-    ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(a), boost_a.str().c_str());
 }
 
 TEST_F(RandomBitTests, Decr256) {
     bmp::uint256_t boost_a(gen256());
-    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
+    uint256_t a = dap_uint256_scan_uninteger(boost_a.str().c_str());
 
     boost_a--;
     DECR_256(&a);
 
-    ASSERT_STREQ(dap_chain_balance_print(a), boost_a.str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(a), boost_a.str().c_str());
 }
 
 //Straight to 256-bit, exclude 64 and 128 for now
@@ -1481,7 +1481,7 @@ TEST(LegacyTests, Math) {
         l=4*density_index;
 
         //???
-//        dap_test_256_one = dap_chain_balance_scan((i + (j << 64) + (k << 128) + (l << 192)).str().c_str());
+//        dap_test_256_one = dap_uint256_scan_uninteger((i + (j << 64) + (k << 128) + (l << 192)).str().c_str());
 
 
 
@@ -1495,7 +1495,7 @@ TEST(LegacyTests, Math) {
         boost_test_256_one=boost_test_256_one_coeff_2_0 + boost_test_256_one_coeff_2_64*boost_two_64
                            +boost_test_256_one_coeff_2_128*boost_two_128+boost_test_256_one_coeff_2_192*boost_two_192;
 
-        dap_test_256_one = dap_chain_balance_scan(boost_test_256_one.str().c_str());
+        dap_test_256_one = dap_uint256_scan_uninteger(boost_test_256_one.str().c_str());
 
         i=max_64-(density_index+1);
         j=max_64-2*(density_index+1);
@@ -1513,7 +1513,7 @@ TEST(LegacyTests, Math) {
                            +boost_test_256_two_coeff_2_128*boost_two_128+boost_test_256_two_coeff_2_192*boost_two_192;
 
 
-        dap_test_256_two = dap_chain_balance_scan(boost_test_256_two.str().c_str());
+        dap_test_256_two = dap_uint256_scan_uninteger(boost_test_256_two.str().c_str());
 
 
 //        add(boost_add_256, i, j);
@@ -1521,7 +1521,7 @@ TEST(LegacyTests, Math) {
 //        boost_test_256_sum=add(boost_test_256_sum,boost_test_256_one,boost_test_256_two);
         boost_test_256_sum = boost_test_256_one + boost_test_256_two;
 
-        ASSERT_STREQ(dap_chain_balance_print(dap_test_256_sum), boost_test_256_sum.str().c_str());
+        ASSERT_STREQ(dap_uint256_uninteger_to_char(dap_test_256_sum), boost_test_256_sum.str().c_str());
 
 
         }
@@ -1655,7 +1655,7 @@ TEST(LegacyTests, Uint256) {
         boost_test_256_one=boost_test_256_one_coeff_2_0 + boost_test_256_one_coeff_2_64*boost_two_64
                            +boost_test_256_one_coeff_2_128*boost_two_128+boost_test_256_one_coeff_2_192*boost_two_192;
 
-        dap_test_256_one = dap_chain_balance_scan(boost_test_256_one.str().c_str());
+        dap_test_256_one = dap_uint256_scan_uninteger(boost_test_256_one.str().c_str());
 //        boost_test_256_one_hi=boost_test_256_one_coeff_2_128+boost_two_64*boost_test_256_one_coeff_2_192;
 //        boost_test_256_one_lo=boost_test_256_one_coeff_2_0+boost_test_256_one_coeff_2_64*boost_two_64;
 
@@ -1675,11 +1675,11 @@ TEST(LegacyTests, Uint256) {
         boost_test_256_two=boost_test_256_two_coeff_2_0 + boost_test_256_two_coeff_2_64*boost_two_64
                            +boost_test_256_two_coeff_2_128*boost_two_128+boost_test_256_two_coeff_2_192*boost_two_192;
 
-        dap_test_256_two = dap_chain_balance_scan(boost_test_256_two.str().c_str());
+        dap_test_256_two = dap_uint256_scan_uninteger(boost_test_256_two.str().c_str());
         overflow_flag=SUM_256_256(dap_test_256_one,dap_test_256_two,&dap_test_256_sum);
         boost_test_256_sum = boost_test_256_one + boost_test_256_two;
 
-        ASSERT_STREQ(dap_chain_balance_print(dap_test_256_sum), boost_test_256_sum.str().c_str()) << "incorrect output for density index=" << density_index;
+        ASSERT_STREQ(dap_uint256_uninteger_to_char(dap_test_256_sum), boost_test_256_sum.str().c_str()) << "incorrect output for density index=" << density_index;
 
 
 
@@ -1688,7 +1688,7 @@ TEST(LegacyTests, Uint256) {
         borrow_flag_256=SUBTRACT_256_256(dap_test_256_two,dap_test_256_one,&dap_test_256_sub);
         boost_test_256_sub = boost_test_256_two - boost_test_256_one;
 
-        ASSERT_STREQ(dap_chain_balance_print(dap_test_256_sub), boost_test_256_sub.str().c_str()) << "incorrect output for density index=" << density_index;
+        ASSERT_STREQ(dap_uint256_uninteger_to_char(dap_test_256_sub), boost_test_256_sub.str().c_str()) << "incorrect output for density index=" << density_index;
 
 
         /////////////////////output of 256*256-->256//////////////////////
@@ -1697,7 +1697,7 @@ TEST(LegacyTests, Uint256) {
 
         boost_test_256_prod = (boost_test_256_one * boost_test_256_two);
 
-        ASSERT_STREQ(dap_chain_balance_print(dap_test_256_prod), boost_test_256_prod.str().c_str()) << "incorrect output for density index=" << density_index;
+        ASSERT_STREQ(dap_uint256_uninteger_to_char(dap_test_256_prod), boost_test_256_prod.str().c_str()) << "incorrect output for density index=" << density_index;
 
 
 //        multiply(boost_test_256_prod,boost_test_256_one,boost_test_256_two);
@@ -1817,8 +1817,8 @@ TEST(LegacyTests, Uint256) {
         boost_test_128_128_one=i+j*boost_two_64_for_128_calc;
         boost_test_128_128_two=max_64-(i+1)+(max_64-2*(j+1))*boost_two_64_for_128_calc;
 
-        dap_test_128_128_prod_one = dap_chain_balance_scan(boost_test_128_128_one.str().c_str()).lo;
-        dap_test_128_128_prod_two = dap_chain_balance_scan(boost_test_128_128_two.str().c_str()).lo;
+        dap_test_128_128_prod_one = dap_uint256_scan_uninteger(boost_test_128_128_one.str().c_str()).lo;
+        dap_test_128_128_prod_two = dap_uint256_scan_uninteger(boost_test_128_128_two.str().c_str()).lo;
 
 
         multiply(boost_test_128_128_prod, boost_test_128_128_one, boost_test_128_128_two);
@@ -1840,8 +1840,8 @@ TEST(LegacyTests, Uint256) {
 
         ///128 bit subtraction
 
-        dap_test_128_one = dap_chain_balance_scan(boost_test_128_one.str().c_str()).lo;
-        dap_test_128_two = dap_chain_balance_scan(boost_test_128_two.str().c_str()).lo;
+        dap_test_128_one = dap_uint256_scan_uninteger(boost_test_128_one.str().c_str()).lo;
+        dap_test_128_two = dap_uint256_scan_uninteger(boost_test_128_two.str().c_str()).lo;
 
         borrow_flag_128=SUBTRACT_128_128(dap_test_128_one,dap_test_128_two,&dap_test_128_sub);
         subtract(boost_test_128_sub,boost_test_128_one,boost_test_128_two);
@@ -1890,13 +1890,13 @@ TEST(LegacyTests, Uint256) {
         boost_test_128_256_one=i+j*boost_two_64_for_128_calc;
         boost_test_128_256_two=(max_64-(i+1))+(max_64-2*(j+1))*boost_two_64_for_128_calc;
 
-        dap_test_128_256_prod_one = dap_chain_balance_scan(boost_test_128_256_one.str().c_str()).lo;
-        dap_test_128_256_prod_two = dap_chain_balance_scan(boost_test_128_256_two.str().c_str()).lo;
+        dap_test_128_256_prod_one = dap_uint256_scan_uninteger(boost_test_128_256_one.str().c_str()).lo;
+        dap_test_128_256_prod_two = dap_uint256_scan_uninteger(boost_test_128_256_two.str().c_str()).lo;
 
         multiply(boost_test_128_256_prod, boost_test_128_256_one, boost_test_128_256_two);
         MULT_128_256(dap_test_128_256_prod_one,dap_test_128_256_prod_two,&dap_test_128_256_prod_prod);
 
-        ASSERT_EQ(bmp::uint256_t(dap_chain_balance_print(dap_test_128_256_prod_prod)), boost_test_128_256_prod) << boost_test_128_256_one << " * " << boost_test_128_256_two;
+        ASSERT_EQ(bmp::uint256_t(dap_uint256_uninteger_to_char(dap_test_128_256_prod_prod)), boost_test_128_256_prod) << boost_test_128_256_one << " * " << boost_test_128_256_two;
 
 
 
@@ -1923,8 +1923,8 @@ TEST(LegacyTests, Uint256) {
 //            boost_test_128_quot_one=i+j*boost_two_64_for_128_calc;
 //            boost_test_128_quot_two=(max_64-(i+1))+(max_64-2*(j+1))*boost_two_64_for_128_calc;
 //
-//            dap_test_128_quot_one = dap_chain_balance_scan(boost_test_128_quot_one.str().c_str()).lo;
-//            dap_test_128_quot_two = dap_chain_balance_scan(boost_test_128_quot_two.str().c_str()).lo;
+//            dap_test_128_quot_one = dap_uint256_scan_uninteger(boost_test_128_quot_one.str().c_str()).lo;
+//            dap_test_128_quot_two = dap_uint256_scan_uninteger(boost_test_128_quot_two.str().c_str()).lo;
 //
 //            divide_qr( boost_test_128_quot_two, boost_test_128_quot_one,boost_test_128_quot_quot,boost_test_128_quot_rem);
 //            divmod_impl_128(dap_test_128_quot_one,dap_test_128_quot_two,&dap_test_128_quot_quot, &dap_test_128_quot_rem);
@@ -1947,16 +1947,16 @@ TEST(MathTests, Sum256Zeroes) {
     string lhs = "0";
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUM_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
 
     SUM_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Sum256OneZero) {
@@ -1965,16 +1965,16 @@ TEST(MathTests, Sum256OneZero) {
     string lhs = "1";
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUM_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
 
     SUM_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Sum256OneOne) {
@@ -1983,16 +1983,16 @@ TEST(MathTests, Sum256OneOne) {
     string lhs = "1";
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUM_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
 
     SUM_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Sum256Min128Zero) {
@@ -2001,16 +2001,16 @@ TEST(MathTests, Sum256Min128Zero) {
     string lhs = MIN128STR;
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUM_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
 
     SUM_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Sum256Min128One) {
@@ -2019,16 +2019,16 @@ TEST(MathTests, Sum256Min128One) {
     string lhs = MIN128STR;
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUM_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
 
     SUM_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Sum256Min128Two) {
@@ -2037,16 +2037,16 @@ TEST(MathTests, Sum256Min128Two) {
     string lhs = MIN128STR;
     string rhs = "2";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUM_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
 
     SUM_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Sum256Max128Zero) {
@@ -2055,16 +2055,16 @@ TEST(MathTests, Sum256Max128Zero) {
     string lhs = MAX128STR;
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUM_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
 
     SUM_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Sum256Max128One) {
@@ -2073,16 +2073,16 @@ TEST(MathTests, Sum256Max128One) {
     string lhs = MAX128STR;
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUM_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
 
     SUM_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Sum256Max128Two) {
@@ -2091,16 +2091,16 @@ TEST(MathTests, Sum256Max128Two) {
     string lhs = MAX128STR;
     string rhs = "2";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUM_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
 
     SUM_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Sum256Min256Zero) {
@@ -2109,16 +2109,16 @@ TEST(MathTests, Sum256Min256Zero) {
     string lhs = MIN256STR;
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUM_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
 
     SUM_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Sum256Min256One) {
@@ -2127,16 +2127,16 @@ TEST(MathTests, Sum256Min256One) {
     string lhs = MIN256STR;
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUM_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
 
     SUM_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Sum256Min256Two) {
@@ -2145,16 +2145,16 @@ TEST(MathTests, Sum256Min256Two) {
     string lhs = MIN256STR;
     string rhs = "2";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUM_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
 
     SUM_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Sum256Max256Zero) {
@@ -2163,16 +2163,16 @@ TEST(MathTests, Sum256Max256Zero) {
     string lhs = MAX256STR;
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUM_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
 
     SUM_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Sum256Max256One) {
@@ -2181,32 +2181,32 @@ TEST(MathTests, Sum256Max256One) {
     string lhs = MAX256STR;
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUM_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) + bmp::uint256_t(rhs)).str().c_str());
 
     SUM_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) + bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST_F(RandomMathTests, Sum256) {
     bmp::uint256_t boost_a(gen256()), boost_b(gen256());
 
-    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
-    uint256_t b = dap_chain_balance_scan(boost_b.str().c_str());
+    uint256_t a = dap_uint256_scan_uninteger(boost_a.str().c_str());
+    uint256_t b = dap_uint256_scan_uninteger(boost_b.str().c_str());
     uint256_t c = uint256_0;
 
     SUM_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (boost_a+boost_b).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (boost_a+boost_b).str().c_str());
 
     SUM_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (boost_b+boost_a).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (boost_b+boost_a).str().c_str());
 }
 
 /// SUBTRACTION
@@ -2217,16 +2217,16 @@ TEST(MathTests, Sub256Zeroes) {
     string lhs = "0";
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 
     SUBTRACT_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) - bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) - bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256OneZero) {
@@ -2235,12 +2235,12 @@ TEST(MathTests, Sub256OneZero) {
     string lhs = "1";
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256ZeroOne) {
@@ -2249,12 +2249,12 @@ TEST(MathTests, Sub256ZeroOne) {
     string lhs = "0";
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256OneOne) {
@@ -2263,12 +2263,12 @@ TEST(MathTests, Sub256OneOne) {
     string lhs = "1";
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256Min128Zero) {
@@ -2277,12 +2277,12 @@ TEST(MathTests, Sub256Min128Zero) {
     string lhs = MIN128STR;
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256ZeroMin128) {
@@ -2291,12 +2291,12 @@ TEST(MathTests, Sub256ZeroMin128) {
     string lhs = "0";
     string rhs = MIN128STR;
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256Min128One) {
@@ -2305,12 +2305,12 @@ TEST(MathTests, Sub256Min128One) {
     string lhs = MIN128STR;
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256OneMin128) {
@@ -2319,12 +2319,12 @@ TEST(MathTests, Sub256OneMin128) {
     string lhs = "1";
     string rhs = MIN128STR;
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256Min128Two) {
@@ -2333,12 +2333,12 @@ TEST(MathTests, Sub256Min128Two) {
     string lhs = MIN128STR;
     string rhs = "2";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256TwoMin128) {
@@ -2347,12 +2347,12 @@ TEST(MathTests, Sub256TwoMin128) {
     string lhs = "2";
     string rhs = MIN128STR;
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256Max128Zero) {
@@ -2361,12 +2361,12 @@ TEST(MathTests, Sub256Max128Zero) {
     string lhs = MAX128STR;
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256ZeroMax128) {
@@ -2375,12 +2375,12 @@ TEST(MathTests, Sub256ZeroMax128) {
     string lhs = "0";
     string rhs = MAX128STR;
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256Max128One) {
@@ -2389,12 +2389,12 @@ TEST(MathTests, Sub256Max128One) {
     string lhs = MAX128STR;
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256OneMax128) {
@@ -2403,12 +2403,12 @@ TEST(MathTests, Sub256OneMax128) {
     string lhs = "1";
     string rhs = MAX128STR;
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256Max128Two) {
@@ -2417,12 +2417,12 @@ TEST(MathTests, Sub256Max128Two) {
     string lhs = MAX128STR;
     string rhs = "2";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256TwoMax128) {
@@ -2431,12 +2431,12 @@ TEST(MathTests, Sub256TwoMax128) {
     string lhs = "2";
     string rhs = MAX128STR;
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256Min256Zero) {
@@ -2445,12 +2445,12 @@ TEST(MathTests, Sub256Min256Zero) {
     string lhs = MIN256STR;
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256ZeroMin256) {
@@ -2459,12 +2459,12 @@ TEST(MathTests, Sub256ZeroMin256) {
     string lhs = "0";
     string rhs = MIN256STR;
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256Min256One) {
@@ -2473,12 +2473,12 @@ TEST(MathTests, Sub256Min256One) {
     string lhs = MIN256STR;
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 
 }
 
@@ -2488,12 +2488,12 @@ TEST(MathTests, Sub256OneMin256) {
     string lhs = "1";
     string rhs = MIN256STR;
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256Min256Two) {
@@ -2502,12 +2502,12 @@ TEST(MathTests, Sub256Min256Two) {
     string lhs = MIN256STR;
     string rhs = "2";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256TwoMin256) {
@@ -2516,12 +2516,12 @@ TEST(MathTests, Sub256TwoMin256) {
     string lhs = "2";
     string rhs = MIN256STR;
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256Max256Zero) {
@@ -2530,12 +2530,12 @@ TEST(MathTests, Sub256Max256Zero) {
     string lhs = MAX256STR;
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256ZeroMax256) {
@@ -2544,12 +2544,12 @@ TEST(MathTests, Sub256ZeroMax256) {
     string lhs = "0";
     string rhs = MAX256STR;
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256Max256One) {
@@ -2558,12 +2558,12 @@ TEST(MathTests, Sub256Max256One) {
     string lhs = MAX256STR;
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Sub256OneMax256) {
@@ -2572,24 +2572,24 @@ TEST(MathTests, Sub256OneMax256) {
     string lhs = "1";
     string rhs = MAX256STR;
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) - bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST_F(RandomMathTests, Sub256) {
     bmp::uint256_t boost_a(gen256()), boost_b(gen256());
 
-    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
-    uint256_t b = dap_chain_balance_scan(boost_b.str().c_str());
+    uint256_t a = dap_uint256_scan_uninteger(boost_a.str().c_str());
+    uint256_t b = dap_uint256_scan_uninteger(boost_b.str().c_str());
     uint256_t c = uint256_0;
 
     SUBTRACT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (boost_a-boost_b).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (boost_a-boost_b).str().c_str());
 }
 
 
@@ -2600,16 +2600,16 @@ TEST(MathTests, Prod256Zeroes) {
     string lhs = "0";
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     MULT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
 
     MULT_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Prod256OneZero) {
@@ -2618,16 +2618,16 @@ TEST(MathTests, Prod256OneZero) {
     string lhs = "0";
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     MULT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
 
     MULT_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Prod256OneOne) {
@@ -2636,16 +2636,16 @@ TEST(MathTests, Prod256OneOne) {
     string lhs = "1";
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     MULT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
 
     MULT_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Prod256Min128Zero) {
@@ -2654,16 +2654,16 @@ TEST(MathTests, Prod256Min128Zero) {
     string lhs = MIN128STR;
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     MULT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
 
     MULT_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Prod256Min128One) {
@@ -2672,16 +2672,16 @@ TEST(MathTests, Prod256Min128One) {
     string lhs = MIN128STR;
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     MULT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
 
     MULT_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Prod256Min128Two) {
@@ -2690,16 +2690,16 @@ TEST(MathTests, Prod256Min128Two) {
     string lhs = MIN128STR;
     string rhs = "2";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     MULT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
 
     MULT_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Prod256Max128Zero) {
@@ -2708,16 +2708,16 @@ TEST(MathTests, Prod256Max128Zero) {
     string lhs = MAX128STR;
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     MULT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
 
     MULT_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Prod256Max128One) {
@@ -2726,16 +2726,16 @@ TEST(MathTests, Prod256Max128One) {
     string lhs = MAX128STR;
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     MULT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
 
     MULT_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Prod256Max128Two) {
@@ -2744,16 +2744,16 @@ TEST(MathTests, Prod256Max128Two) {
     string lhs = MAX128STR;
     string rhs = "2";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     MULT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
 
     MULT_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Prod256Min256Zero) {
@@ -2762,16 +2762,16 @@ TEST(MathTests, Prod256Min256Zero) {
     string lhs = MIN256STR;
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     MULT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
 
     MULT_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Prod256Min256One) {
@@ -2780,16 +2780,16 @@ TEST(MathTests, Prod256Min256One) {
     string lhs = MIN256STR;
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     MULT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
 
     MULT_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Prod256Min256Two) {
@@ -2798,16 +2798,16 @@ TEST(MathTests, Prod256Min256Two) {
     string lhs = MIN256STR;
     string rhs = "2";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     MULT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
 
     MULT_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Prod256Max256Zero) {
@@ -2816,16 +2816,16 @@ TEST(MathTests, Prod256Max256Zero) {
     string lhs = MAX256STR;
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     MULT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
 
     MULT_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Prod256Max256One) {
@@ -2834,32 +2834,32 @@ TEST(MathTests, Prod256Max256One) {
     string lhs = MAX256STR;
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     MULT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) * bmp::uint256_t(rhs)).str().c_str());
 
     MULT_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) * bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST_F(RandomMathTests, Prod256) {
     bmp::uint256_t boost_a(gen256()), boost_b(gen256());
 
-    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
-    uint256_t b = dap_chain_balance_scan(boost_b.str().c_str());
+    uint256_t a = dap_uint256_scan_uninteger(boost_a.str().c_str());
+    uint256_t b = dap_uint256_scan_uninteger(boost_b.str().c_str());
     uint256_t c = uint256_0;
 
     MULT_256_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (boost_a*boost_b).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (boost_a*boost_b).str().c_str());
 
     MULT_256_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (boost_b*boost_a).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (boost_b*boost_a).str().c_str());
 }
 
 
@@ -2872,16 +2872,16 @@ TEST(DISABLED_MathTests, Div256Zeroes) {
     string lhs = "0";
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 
     DIV_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) / bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) / bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(DISABLED_MathTests, Div256OneZero) {
@@ -2890,12 +2890,12 @@ TEST(DISABLED_MathTests, Div256OneZero) {
     string lhs = "1";
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Div256ZeroOne) {
@@ -2904,12 +2904,12 @@ TEST(MathTests, Div256ZeroOne) {
     string lhs = "0";
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Div256OneOne) {
@@ -2918,12 +2918,12 @@ TEST(MathTests, Div256OneOne) {
     string lhs = "1";
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(DISABLED_MathTests, Div256Min128Zero) {
@@ -2932,12 +2932,12 @@ TEST(DISABLED_MathTests, Div256Min128Zero) {
     string lhs = MIN128STR;
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Div256ZeroMin128) {
@@ -2946,12 +2946,12 @@ TEST(MathTests, Div256ZeroMin128) {
     string lhs = "0";
     string rhs = MIN128STR;
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Div256Min128One) {
@@ -2960,12 +2960,12 @@ TEST(MathTests, Div256Min128One) {
     string lhs = MIN128STR;
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Div256OneMin128) {
@@ -2974,12 +2974,12 @@ TEST(MathTests, Div256OneMin128) {
     string lhs = "1";
     string rhs = MIN128STR;
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Div256Min128Two) {
@@ -2988,12 +2988,12 @@ TEST(MathTests, Div256Min128Two) {
     string lhs = MIN128STR;
     string rhs = "2";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Div256TwoMin128) {
@@ -3002,12 +3002,12 @@ TEST(MathTests, Div256TwoMin128) {
     string lhs = "2";
     string rhs = MIN128STR;
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(DISABLED_MathTests, Div256Max128Zero) {
@@ -3016,12 +3016,12 @@ TEST(DISABLED_MathTests, Div256Max128Zero) {
     string lhs = MAX128STR;
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Div256ZeroMax128) {
@@ -3030,12 +3030,12 @@ TEST(MathTests, Div256ZeroMax128) {
     string lhs = MAX128STR;
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(b, a, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(rhs) / bmp::uint256_t(lhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(rhs) / bmp::uint256_t(lhs)).str().c_str());
 }
 
 TEST(MathTests, Div256Max128One) {
@@ -3044,12 +3044,12 @@ TEST(MathTests, Div256Max128One) {
     string lhs = MAX128STR;
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Div256OneMax128) {
@@ -3058,12 +3058,12 @@ TEST(MathTests, Div256OneMax128) {
     string lhs = "1";
     string rhs = MAX128STR;
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Div256Max128Two) {
@@ -3072,12 +3072,12 @@ TEST(MathTests, Div256Max128Two) {
     string lhs = MAX128STR;
     string rhs = "2";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Div256TwoMax128) {
@@ -3086,12 +3086,12 @@ TEST(MathTests, Div256TwoMax128) {
     string lhs = "2";
     string rhs = MAX128STR;
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(DISABLED_MathTests, Div256Min256Zero) {
@@ -3100,12 +3100,12 @@ TEST(DISABLED_MathTests, Div256Min256Zero) {
     string lhs = MIN256STR;
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Div256ZeroMin256) {
@@ -3114,12 +3114,12 @@ TEST(MathTests, Div256ZeroMin256) {
     string lhs = "0";
     string rhs = MIN256STR;
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Div256Min256One) {
@@ -3128,12 +3128,12 @@ TEST(MathTests, Div256Min256One) {
     string lhs = MIN256STR;
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 
 }
 
@@ -3143,12 +3143,12 @@ TEST(MathTests, Div256OneMin256) {
     string lhs = "1";
     string rhs = MIN256STR;
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Div256Min256Two) {
@@ -3157,12 +3157,12 @@ TEST(MathTests, Div256Min256Two) {
     string lhs = MIN256STR;
     string rhs = "2";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Div256TwoMin256) {
@@ -3171,12 +3171,12 @@ TEST(MathTests, Div256TwoMin256) {
     string lhs = "2";
     string rhs = MIN256STR;
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(DISABLED_MathTests, Div256Max256Zero) {
@@ -3185,12 +3185,12 @@ TEST(DISABLED_MathTests, Div256Max256Zero) {
     string lhs = MAX256STR;
     string rhs = "0";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Div256ZeroMax256) {
@@ -3199,12 +3199,12 @@ TEST(MathTests, Div256ZeroMax256) {
     string lhs = "0";
     string rhs = MAX256STR;
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Div256Max256One) {
@@ -3213,12 +3213,12 @@ TEST(MathTests, Div256Max256One) {
     string lhs = MAX256STR;
     string rhs = "1";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, Div256OneMax256) {
@@ -3227,12 +3227,12 @@ TEST(MathTests, Div256OneMax256) {
     string lhs = "1";
     string rhs = MAX256STR;
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (bmp::uint256_t(lhs) / bmp::uint256_t(rhs)).str().c_str());
 }
 
 TEST(MathTests, DivMoreToLess) {
@@ -3241,10 +3241,10 @@ TEST(MathTests, DivMoreToLess) {
     string lhs = "25000";
     string rhs = "10000";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
     DIV_256_COIN(a, b, &c);
-    ASSERT_STREQ(dap_chain_balance_to_coins(c), "2.5");
+    ASSERT_STREQ(dap_uint256_decimal_to_char(c), "2.5");
 }
 
 TEST(MathTests, DivMoreToLessPrimes) {
@@ -3253,10 +3253,10 @@ TEST(MathTests, DivMoreToLessPrimes) {
     string lhs = "23";
     string rhs = "13";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
     DIV_256_COIN(a, b, &c);
-    ASSERT_STREQ(dap_chain_balance_to_coins(c), "1.76923076923076923");
+    ASSERT_STREQ(dap_uint256_decimal_to_char(c), "1.76923076923076923");
 }
 
 TEST(MathTests, DivMoreToLessClassic) {
@@ -3265,10 +3265,10 @@ TEST(MathTests, DivMoreToLessClassic) {
     string lhs = "2500";
     string rhs = "1000";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
     DIV_256_COIN(a, b, &c);
-    ASSERT_STREQ(dap_chain_balance_to_coins(c), "2.5");
+    ASSERT_STREQ(dap_uint256_decimal_to_char(c), "2.5");
 }
 
 TEST(MathTests, DivMoreToLessSixFour) {
@@ -3277,10 +3277,10 @@ TEST(MathTests, DivMoreToLessSixFour) {
     string lhs = "6";
     string rhs = "4";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
     DIV_256_COIN(a, b, &c);
-    ASSERT_STREQ(dap_chain_balance_to_coins(c), "1.5");
+    ASSERT_STREQ(dap_uint256_decimal_to_char(c), "1.5");
 }
 
 TEST(MathTests, DivMoreToLessSixThree) {
@@ -3289,10 +3289,10 @@ TEST(MathTests, DivMoreToLessSixThree) {
     string lhs = "6";
     string rhs = "3";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
     DIV_256_COIN(a, b, &c);
-    ASSERT_STREQ(dap_chain_balance_to_coins(c), "2.0");
+    ASSERT_STREQ(dap_uint256_decimal_to_char(c), "2.0");
 }
 
 TEST(MathTests, DivMoreToLessBigBig) {
@@ -3301,18 +3301,18 @@ TEST(MathTests, DivMoreToLessBigBig) {
     string lhs = "1.0e+57";
     string rhs = "1.0e+23";
 
-    a = dap_chain_balance_scan(lhs.c_str());
-    b = dap_chain_balance_scan(rhs.c_str());
+    a = dap_uint256_scan_uninteger(lhs.c_str());
+    b = dap_uint256_scan_uninteger(rhs.c_str());
     DIV_256_COIN(a, b, &c);
-    ASSERT_STREQ(dap_chain_balance_to_coins(c), "10000000000000000000000000000000000.0");
+    ASSERT_STREQ(dap_uint256_decimal_to_char(c), "10000000000000000000000000000000000.0");
 }
 
 
 TEST_F(RandomMathTests, Div256) {
     bmp::uint256_t boost_a(gen256()), boost_b(gen256());
 
-    uint256_t a = dap_chain_balance_scan(boost_a.str().c_str());
-    uint256_t b = dap_chain_balance_scan(boost_b.str().c_str());
+    uint256_t a = dap_uint256_scan_uninteger(boost_a.str().c_str());
+    uint256_t b = dap_uint256_scan_uninteger(boost_b.str().c_str());
     uint256_t c = uint256_0;
 
     if (boost_b == 0) {
@@ -3321,6 +3321,6 @@ TEST_F(RandomMathTests, Div256) {
 
     DIV_256(a, b, &c);
 
-    ASSERT_STREQ(dap_chain_balance_print(c), (boost_a/boost_b).str().c_str());
+    ASSERT_STREQ(dap_uint256_uninteger_to_char(c), (boost_a/boost_b).str().c_str());
 }
 
diff --git a/core/test/uint256_t/CMakeLists.txt b/core/test/uint256_t/CMakeLists.txt
index f4d14b331..747060cdb 100644
--- a/core/test/uint256_t/CMakeLists.txt
+++ b/core/test/uint256_t/CMakeLists.txt
@@ -7,8 +7,7 @@ set(CMAKE_C_STANDARD 11)
 set(CMAKE_CXX_STANDARD 14)
  
  
-include_directories(../modules/common/include)
-include_directories(../dap-sdk/core/include)
+include_directories(../../include/)
  
  
 set(BOOST_REQUESTED_VERSION 1.65)
@@ -17,7 +16,8 @@ if (NOT Boost_INCLUDE_DIR)
         FIND_PACKAGE( Boost COMPONENTS system program_options REQUIRED )
 endif()
  
-INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
+INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR}
+                    ../../include/)
  
 include(FetchContent)
 FetchContent_Declare(
@@ -33,18 +33,16 @@ add_executable(
 	${PROJECT_NAME}
         256_tests.cc
 )
-target_link_libraries(
-	${PROJECT_NAME}
-        GTest::gtest_main
-        GTest::gtest
-        ${Boost_LIBRARIES}
-        m
-        dap_core
+target_link_libraries(${PROJECT_NAME}
+		dap_core
+		GTest::gtest_main
+		GTest::gtest
+		${Boost_LIBRARIES}
+		m
 )
-target_include_directories(
-	${PROJECT_NAME}
+target_include_directories(${PROJECT_NAME}
         INTERFACE
-        ../
+        ../../include/
 )
 
 include(GoogleTest)
-- 
GitLab


From 3295bcbc0217549617d72e0eccb7cb41ca743ce4 Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Tue, 31 Oct 2023 21:20:58 +0700
Subject: [PATCH 13/21] [*] Fixed math test.

---
 core/include/dap_math_convert.h    | 175 ++++++++++++++++-------------
 core/test/uint256_t/CMakeLists.txt |  21 ++--
 2 files changed, 105 insertions(+), 91 deletions(-)

diff --git a/core/include/dap_math_convert.h b/core/include/dap_math_convert.h
index 8e9e9aa50..11c005a74 100644
--- a/core/include/dap_math_convert.h
+++ b/core/include/dap_math_convert.h
@@ -8,89 +8,104 @@
 #define DAP_CHAIN$SZ_MAX256DEC DATOSHI_POW256                                       /* 2 ^ 256 = 1.15792089237316195423570985008687907853269984665640564039457584007913129639935e77*/
 #define DAP_SZ_MAX256SCINOT (DATOSHI_POW256 + 5)
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 static const union __c_pow10_double__ {
     uint64_t u64[4];
     uint32_t u32[8];
 } DAP_ALIGN_PACKED c_pow10_double[DATOSHI_POW256] = {
 #ifdef DAP_GLOBAL_IS_INT128
-        { .u64 = {0,                            0,                           0,                         1ULL} },                          // 0
-        { .u64 = {0,                            0,                           0,                         10ULL} },                         // 1
-        { .u64 = {0,                            0,                           0,                         100ULL} },                        // 2
-        { .u64 = {0,                            0,                           0,                         1000ULL} },                       // 3
-        { .u64 = {0,                            0,                           0,                         10000ULL} },                      // 4
-        { .u64 = {0,                            0,                           0,                         100000ULL} },                     // 5
-        { .u64 = {0,                            0,                           0,                         1000000ULL} },                    // 6
-        { .u64 = {0,                            0,                           0,                         10000000ULL} },                   // 7
-        { .u64 = {0,                            0,                           0,                         100000000ULL} },                  // 8
-        { .u64 = {0,                            0,                           0,                         1000000000ULL} },                 // 9
-        { .u64 = {0,                            0,                           0,                         10000000000ULL} },                // 10
-        { .u64 = {0,                            0,                           0,                         100000000000ULL} },               // 11
-        { .u64 = {0,                            0,                           0,                         1000000000000ULL} },              // 12
-        { .u64 = {0,                            0,                           0,                         10000000000000ULL} },             // 13
-        { .u64 = {0,                            0,                           0,                         100000000000000ULL} },            // 14
-        { .u64 = {0,                            0,                           0,                         1000000000000000ULL} },           // 15
-        { .u64 = {0,                            0,                           0,                         10000000000000000ULL} },          // 16
-        { .u64 = {0,                            0,                           0,                         100000000000000000ULL} },         // 17
-        { .u64 = {0,                            0,                           0,                         1000000000000000000ULL} },        // 18
-        { .u64 = {0,                            0,                           0,                         10000000000000000000ULL} },       // 19
-        { .u64 = {0,                            0,                           5ULL,                      7766279631452241920ULL} },        // 20
-        { .u64 = {0,                            0,                           54ULL,                     3875820019684212736ULL} },        // 21
-        { .u64 = {0,                            0,                           542ULL,                    1864712049423024128ULL} },        // 22
-        { .u64 = {0,                            0,                           5421ULL,                   200376420520689664ULL} },         // 23
-        { .u64 = {0,                            0,                           54210ULL,                  2003764205206896640ULL} },        // 24
-        { .u64 = {0,                            0,                           542101ULL,                 1590897978359414784ULL} },        // 25
-        { .u64 = {0,                            0,                           5421010ULL,                15908979783594147840ULL} },       // 26
-        { .u64 = {0,                            0,                           54210108ULL,               11515845246265065472ULL} },       // 27
-        { .u64 = {0,                            0,                           542101086ULL,              4477988020393345024ULL} },        // 28
-        { .u64 = {0,                            0,                           5421010862ULL,             7886392056514347008ULL} },        // 29
-        { .u64 = {0,                            0,                           54210108624ULL,            5076944270305263616ULL} },        // 30
-        { .u64 = {0,                            0,                           542101086242ULL,           13875954555633532928ULL} },       // 31
-        { .u64 = {0,                            0,                           5421010862427ULL,          9632337040368467968ULL} },        // 32
-        { .u64 = {0,                            0,                           54210108624275ULL,         4089650035136921600ULL} },        // 33
-        { .u64 = {0,                            0,                           542101086242752ULL,        4003012203950112768ULL} },        // 34
-        { .u64 = {0,                            0,                           5421010862427522ULL,       3136633892082024448ULL} },        // 35
-        { .u64 = {0,                            0,                           54210108624275221ULL,      12919594847110692864ULL} },       // 36
-        { .u64 = {0,                            0,                           542101086242752217ULL,     68739955140067328ULL} },          // 37
-        { .u64 = {0,                            0,                           5421010862427522170ULL,    687399551400673280ULL} },         // 38
-        { .u64 = {0,                            2ULL,                        17316620476856118468ULL,   6873995514006732800ULL} },        // 39
-        { .u64 = {0,                            29ULL,                       7145508105175220139ULL,    13399722918938673152ULL} },       // 40
-        { .u64 = {0,                            293ULL,                      16114848830623546549ULL,   4870020673419870208ULL} },        // 41
-        { .u64 = {0,                            2938ULL,                     13574535716559052564ULL,   11806718586779598848ULL} },       // 42
-        { .u64 = {0,                            29387ULL,                    6618148649623664334ULL,    7386721425538678784ULL} },        // 43
-        { .u64 = {0,                            293873ULL,                   10841254275107988496ULL,   80237960548581376ULL} },          // 44
-        { .u64 = {0,                            2938735ULL,                  16178822382532126880ULL,   802379605485813760ULL} },          // 45
-        { .u64 = {0,                            29387358ULL,                 14214271235644855872ULL,   8023796054858137600ULL} },          // 46
-        { .u64 = {0,                            293873587ULL,                13015503840481697412ULL,   6450984253743169536ULL} },          // 47
-        { .u64 = {0,                            2938735877ULL,               1027829888850112811ULL,    9169610316303040512ULL} },          // 48
-        { .u64 = {0,                            29387358770ULL,              10278298888501128114ULL,   17909126868192198656ULL} },          // 49
-        { .u64 = {0,                            293873587705ULL,             10549268516463523069ULL,   13070572018536022016ULL} },          // 50
-        { .u64 = {0,                            2938735877055ULL,            13258964796087472617ULL,   1578511669393358848ULL} },          // 51
-        { .u64 = {0,                            29387358770557ULL,           3462439444907864858ULL,    15785116693933588480ULL} },          // 52
-        { .u64 = {0,                            293873587705571ULL,          16177650375369096972ULL,   10277214349659471872ULL} },          // 53
-        { .u64 = {0,                            2938735877055718ULL,         14202551164014556797ULL,   10538423128046960640ULL} },          // 54
-        { .u64 = {0,                            29387358770557187ULL,        12898303124178706663ULL,   13150510911921848320ULL} },          // 55
-        { .u64 = {0,                            293873587705571876ULL,       18302566799529756941ULL,   2377900603251621888ULL} },          // 56
-        { .u64 = {0,                            2938735877055718769ULL,      17004971331911604867ULL,   5332261958806667264ULL} },          // 57
-        { .u64 = {1,                            10940614696847636083ULL,     4029016655730084128ULL,    16429131440647569408ULL} },          // 58
-        { .u64 = {15ULL,                        17172426599928602752ULL,     3396678409881738056ULL,    16717361816799281152ULL} },          // 59
-        { .u64 = {159ULL,                       5703569335900062977ULL,      15520040025107828953ULL,   1152921504606846976ULL} },          // 60
-        { .u64 = {1593ULL,                      1695461137871974930ULL,      7626447661401876602ULL,    11529215046068469760ULL} },          // 61
-        { .u64 = {15930ULL,                     16954611378719749304ULL,     2477500319180559562ULL,    4611686018427387904ULL} },          // 62
-        { .u64 = {159309ULL,                    3525417123811528497ULL,      6328259118096044006ULL,    9223372036854775808ULL} },          // 63
-        { .u64 = {1593091ULL,                   16807427164405733357ULL,     7942358959831785217ULL,    0ULL} },                            // 64
-        { .u64 = {15930919ULL,                  2053574980671369030ULL,      5636613303479645706ULL,    0ULL} },                            // 65
-        { .u64 = {159309191ULL,                 2089005733004138687ULL,      1025900813667802212ULL,    0ULL} },                            // 66
-        { .u64 = {1593091911ULL,                2443313256331835254ULL,      10259008136678022120ULL,   0ULL} },                            // 67
-        { .u64 = {15930919111ULL,               5986388489608800929ULL,      10356360998232463120ULL,   0ULL} },                            // 68
-        { .u64 = {159309191113ULL,              4523652674959354447ULL,      11329889613776873120ULL,   0ULL} },                            // 69
-        { .u64 = {1593091911132ULL,             8343038602174441244ULL,      2618431695511421504ULL,    0ULL} },                            // 70
-        { .u64 = {15930919111324ULL,            9643409726906205977ULL,      7737572881404663424ULL,    0ULL} },                            // 71
-        { .u64 = {159309191113245ULL,           4200376900514301694ULL,      3588752519208427776ULL,    0ULL} },                            // 72
-        { .u64 = {1593091911132452ULL,          5110280857723913709ULL,      17440781118374726144ULL,   0ULL} },                            // 73
-        { .u64 = {15930919111324522ULL,         14209320429820033867ULL,     8387114520361296896ULL,    0ULL} },                            // 74
-        { .u64 = {159309191113245227ULL,        12965995782233477362ULL,     10084168908774762496ULL,   0ULL} },                            // 75
-        { .u64 = {1593091911132452277ULL,       532749306367912313ULL,       8607968719199866880ULL,    0ULL} },                            // 76
-        { .u64 = {15930919111324522770ULL,       5327493063679123134ULL,       12292710897160462336ULL,    0ULL} },                         // 77
+        {.u64 = {0, 0, 0, 1ULL}},                          // 0
+        {.u64 = {0, 0, 0, 10ULL}},                         // 1
+        {.u64 = {0, 0, 0, 100ULL}},                        // 2
+        {.u64 = {0, 0, 0, 1000ULL}},                       // 3
+        {.u64 = {0, 0, 0, 10000ULL}},                      // 4
+        {.u64 = {0, 0, 0, 100000ULL}},                     // 5
+        {.u64 = {0, 0, 0, 1000000ULL}},                    // 6
+        {.u64 = {0, 0, 0, 10000000ULL}},                   // 7
+        {.u64 = {0, 0, 0, 100000000ULL}},                  // 8
+        {.u64 = {0, 0, 0, 1000000000ULL}},                 // 9
+        {.u64 = {0, 0, 0, 10000000000ULL}},                // 10
+        {.u64 = {0, 0, 0, 100000000000ULL}},               // 11
+        {.u64 = {0, 0, 0, 1000000000000ULL}},              // 12
+        {.u64 = {0, 0, 0, 10000000000000ULL}},             // 13
+        {.u64 = {0, 0, 0, 100000000000000ULL}},            // 14
+        {.u64 = {0, 0, 0, 1000000000000000ULL}},           // 15
+        {.u64 = {0, 0, 0, 10000000000000000ULL}},          // 16
+        {.u64 = {0, 0, 0, 100000000000000000ULL}},         // 17
+        {.u64 = {0, 0, 0, 1000000000000000000ULL}},        // 18
+        {.u64 = {0, 0, 0, 10000000000000000000ULL}},       // 19
+        {.u64 = {0, 0, 5ULL, 7766279631452241920ULL}},        // 20
+        {.u64 = {0, 0, 54ULL, 3875820019684212736ULL}},        // 21
+        {.u64 = {0, 0, 542ULL, 1864712049423024128ULL}},        // 22
+        {.u64 = {0, 0, 5421ULL, 200376420520689664ULL}},         // 23
+        {.u64 = {0, 0, 54210ULL, 2003764205206896640ULL}},        // 24
+        {.u64 = {0, 0, 542101ULL, 1590897978359414784ULL}},        // 25
+        {.u64 = {0, 0, 5421010ULL, 15908979783594147840ULL}},       // 26
+        {.u64 = {0, 0, 54210108ULL, 11515845246265065472ULL}},       // 27
+        {.u64 = {0, 0, 542101086ULL, 4477988020393345024ULL}},        // 28
+        {.u64 = {0, 0, 5421010862ULL, 7886392056514347008ULL}},        // 29
+        {.u64 = {0, 0, 54210108624ULL, 5076944270305263616ULL}},        // 30
+        {.u64 = {0, 0, 542101086242ULL, 13875954555633532928ULL}},       // 31
+        {.u64 = {0, 0, 5421010862427ULL, 9632337040368467968ULL}},        // 32
+        {.u64 = {0, 0, 54210108624275ULL, 4089650035136921600ULL}},        // 33
+        {.u64 = {0, 0, 542101086242752ULL, 4003012203950112768ULL}},        // 34
+        {.u64 = {0, 0, 5421010862427522ULL, 3136633892082024448ULL}},        // 35
+        {.u64 = {0, 0, 54210108624275221ULL, 12919594847110692864ULL}},       // 36
+        {.u64 = {0, 0, 542101086242752217ULL, 68739955140067328ULL}},          // 37
+        {.u64 = {0, 0, 5421010862427522170ULL, 687399551400673280ULL}},         // 38
+        {.u64 = {0, 2ULL, 17316620476856118468ULL, 6873995514006732800ULL}},        // 39
+        {.u64 = {0, 29ULL, 7145508105175220139ULL, 13399722918938673152ULL}},       // 40
+        {.u64 = {0, 293ULL, 16114848830623546549ULL, 4870020673419870208ULL}},        // 41
+        {.u64 = {0, 2938ULL, 13574535716559052564ULL, 11806718586779598848ULL}},       // 42
+        {.u64 = {0, 29387ULL, 6618148649623664334ULL, 7386721425538678784ULL}},        // 43
+        {.u64 = {0, 293873ULL, 10841254275107988496ULL, 80237960548581376ULL}},          // 44
+        {.u64 = {0, 2938735ULL, 16178822382532126880ULL, 802379605485813760ULL}},          // 45
+        {.u64 = {0, 29387358ULL, 14214271235644855872ULL, 8023796054858137600ULL}},          // 46
+        {.u64 = {0, 293873587ULL, 13015503840481697412ULL, 6450984253743169536ULL}},          // 47
+        {.u64 = {0, 2938735877ULL, 1027829888850112811ULL, 9169610316303040512ULL}},          // 48
+        {.u64 = {0, 29387358770ULL, 10278298888501128114ULL, 17909126868192198656ULL}},          // 49
+        {.u64 = {0, 293873587705ULL, 10549268516463523069ULL, 13070572018536022016ULL}},          // 50
+        {.u64 = {0, 2938735877055ULL, 13258964796087472617ULL, 1578511669393358848ULL}},          // 51
+        {.u64 = {0, 29387358770557ULL, 3462439444907864858ULL, 15785116693933588480ULL}},          // 52
+        {.u64 = {0, 293873587705571ULL, 16177650375369096972ULL, 10277214349659471872ULL}},          // 53
+        {.u64 = {0, 2938735877055718ULL, 14202551164014556797ULL, 10538423128046960640ULL}},          // 54
+        {.u64 = {0, 29387358770557187ULL, 12898303124178706663ULL, 13150510911921848320ULL}},          // 55
+        {.u64 = {0, 293873587705571876ULL, 18302566799529756941ULL, 2377900603251621888ULL}},          // 56
+        {.u64 = {0, 2938735877055718769ULL, 17004971331911604867ULL, 5332261958806667264ULL}},          // 57
+        {.u64 = {1, 10940614696847636083ULL, 4029016655730084128ULL, 16429131440647569408ULL}},          // 58
+        {.u64 = {15ULL, 17172426599928602752ULL, 3396678409881738056ULL, 16717361816799281152ULL}},          // 59
+        {.u64 = {159ULL, 5703569335900062977ULL, 15520040025107828953ULL, 1152921504606846976ULL}},          // 60
+        {.u64 = {1593ULL, 1695461137871974930ULL, 7626447661401876602ULL, 11529215046068469760ULL}},          // 61
+        {.u64 = {15930ULL, 16954611378719749304ULL, 2477500319180559562ULL, 4611686018427387904ULL}},          // 62
+        {.u64 = {159309ULL, 3525417123811528497ULL, 6328259118096044006ULL, 9223372036854775808ULL}},          // 63
+        {.u64 = {1593091ULL, 16807427164405733357ULL, 7942358959831785217ULL, 0ULL}},                            // 64
+        {.u64 = {15930919ULL, 2053574980671369030ULL, 5636613303479645706ULL, 0ULL}},                            // 65
+        {.u64 = {159309191ULL, 2089005733004138687ULL, 1025900813667802212ULL, 0ULL}},                            // 66
+        {.u64 = {1593091911ULL, 2443313256331835254ULL, 10259008136678022120ULL,
+                 0ULL}},                            // 67
+        {.u64 = {15930919111ULL, 5986388489608800929ULL, 10356360998232463120ULL,
+                 0ULL}},                            // 68
+        {.u64 = {159309191113ULL, 4523652674959354447ULL, 11329889613776873120ULL,
+                 0ULL}},                            // 69
+        {.u64 = {1593091911132ULL, 8343038602174441244ULL, 2618431695511421504ULL,
+                 0ULL}},                            // 70
+        {.u64 = {15930919111324ULL, 9643409726906205977ULL, 7737572881404663424ULL,
+                 0ULL}},                            // 71
+        {.u64 = {159309191113245ULL, 4200376900514301694ULL, 3588752519208427776ULL,
+                 0ULL}},                            // 72
+        {.u64 = {1593091911132452ULL, 5110280857723913709ULL, 17440781118374726144ULL,
+                 0ULL}},                            // 73
+        {.u64 = {15930919111324522ULL, 14209320429820033867ULL, 8387114520361296896ULL,
+                 0ULL}},                            // 74
+        {.u64 = {159309191113245227ULL, 12965995782233477362ULL, 10084168908774762496ULL,
+                 0ULL}},                            // 75
+        {.u64 = {1593091911132452277ULL, 532749306367912313ULL, 8607968719199866880ULL,
+                 0ULL}},                            // 76
+        {.u64 = {15930919111324522770ULL, 5327493063679123134ULL, 12292710897160462336ULL,
+                 0ULL}},                         // 77
 #else
         { .u32 = {0, 0, 0, 0, 0, 0, 0, 1, } },
         { .u32 = {0, 0, 0, 0, 0, 0, 0, 10, } },
@@ -209,3 +224,7 @@ char *dap_uint256_uninteger_to_char(uint256_t a_uint256);
  * @return char*
  */
 char *dap_uint256_decimal_to_char(uint256_t a_uint256);
+
+#ifdef __cplusplus
+}
+#endif
\ No newline at end of file
diff --git a/core/test/uint256_t/CMakeLists.txt b/core/test/uint256_t/CMakeLists.txt
index 747060cdb..fc2f2e77e 100644
--- a/core/test/uint256_t/CMakeLists.txt
+++ b/core/test/uint256_t/CMakeLists.txt
@@ -1,24 +1,20 @@
 cmake_minimum_required(VERSION 3.10)
-project(256_tests C CXX)
+project(uint256_test C CXX)
 
 set(CMAKE_C_STANDARD 11)
 
 # GoogleTest requires at least C++14
 set(CMAKE_CXX_STANDARD 14)
- 
- 
-include_directories(../../include/)
- 
+
+#include_directories(../../include/)
  
 set(BOOST_REQUESTED_VERSION 1.65)
  
 if (NOT Boost_INCLUDE_DIR)
         FIND_PACKAGE( Boost COMPONENTS system program_options REQUIRED )
 endif()
- 
-INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR}
-                    ../../include/)
- 
+#INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR}
+#                    ../../include/)
 include(FetchContent)
 FetchContent_Declare(
         googletest
@@ -28,10 +24,9 @@ FetchContent_Declare(
 # For Windows: Prevent overriding the parent project's compiler/linker settings
 set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
 FetchContent_MakeAvailable(googletest)
-enable_testing()
-add_executable(
-	${PROJECT_NAME}
-        256_tests.cc
+#enable_testing()
+add_executable(${PROJECT_NAME}
+               256_tests.cc
 )
 target_link_libraries(${PROJECT_NAME}
 		dap_core
-- 
GitLab


From 2d6ba25a3d980fe97f7a8310848417e89a8c9291 Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Tue, 31 Oct 2023 22:48:20 +0700
Subject: [PATCH 14/21] [*] Fixed CmakeLists file for links cellframe-sdk.

---
 CMakeLists.txt | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f89914a68..e27dc3882 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,6 +86,9 @@ if (BUILD_DAP_SDK_TESTS)
 #    set(DAPSDK_MODULES ${DAPSDK_MODULES} global-db)
     message("[+] Enable dap_sdk_tests")
 endif ()
+if (CELLFRAME_MODULES MATCHES "test-framework")
+    add_subdirectory(test-framework)
+endif()
 add_subdirectory(core)
 if (DAPSDK_MODULES MATCHES "crypto")
     # Cryptography
@@ -137,4 +140,6 @@ elseif(ANDROID)
     include_directories(3rdparty/)
 endif()
 
-add_subdirectory(examples)
+if (NOT CELLFRAME_MODULES)
+    add_subdirectory(examples)
+endif()
-- 
GitLab


From b698745b260aa4d10bf6fb6ad12ac4c19e2b18c5 Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Tue, 31 Oct 2023 22:54:44 +0700
Subject: [PATCH 15/21] [*] Added comment old name function.

---
 core/include/dap_math_convert.h | 3 +++
 core/src/dap_math_convert.c     | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/core/include/dap_math_convert.h b/core/include/dap_math_convert.h
index 11c005a74..03e7a6837 100644
--- a/core/include/dap_math_convert.h
+++ b/core/include/dap_math_convert.h
@@ -1,6 +1,9 @@
 #pragma once
 #include "dap_math_ops.h"
 
+/*
+ * Forward declarations
+ */
 #define DATOSHI_DEGREE 18
 #define DATOSHI_POW 39
 #define DATOSHI_POW256 (DATOSHI_POW * 2)
diff --git a/core/src/dap_math_convert.c b/core/src/dap_math_convert.c
index 6f3a44086..1e4527e62 100644
--- a/core/src/dap_math_convert.c
+++ b/core/src/dap_math_convert.c
@@ -151,7 +151,7 @@ uint256_t dap_uint256_scan_uninteger(const char *a_str_uninteger){ //dap_chain_b
     return l_ret;
 }
 
-uint256_t dap_uint256_scan_decimal(const char *a_str_decimal){
+uint256_t dap_uint256_scan_decimal(const char *a_str_decimal){ //dap_chain_coins_to_balance256, dap_chain_coins_to_balance
     int l_len, l_pos;
     char    l_buf  [DAP_CHAIN$SZ_MAX256DEC + 8] = {0}, *l_point;
 
@@ -216,7 +216,7 @@ char *dap_uint256_uninteger_to_char(uint256_t a_uint256) {
     return l_buf;
 }
 
-char *dap_uint256_decimal_to_char(uint256_t a_uint256){
+char *dap_uint256_decimal_to_char(uint256_t a_uint256){ //dap_chain_balance_to_coins256, dap_chain_balance_to_coins
     char *l_buf, *l_cp;
     int l_strlen, l_len;
 
-- 
GitLab


From aea18e1f2eebfa6acd4692e78ea338f588a656f5 Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Wed, 1 Nov 2023 16:54:23 +0700
Subject: [PATCH 16/21] [+] Added gitlab-ci.

---
 .gitlab-ci.yml | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 000000000..b2d481ce0
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,57 @@
+variables:
+    GIT_SUBMODULE_STRATEGY: recursive
+
+stages:
+    - build
+
+.ci-polygon:
+  tags:
+     - ci-polygon
+  
+.tests:  
+  extends: .ci-polygon
+  stage: build
+  timeout: 3 hours 30 minutes
+  dependencies: []
+  
+  
+linux-amd64-tests:
+    extends: .tests
+    image: demlabs/amd64/debian-bullseye:linuxbuilder
+    before_script: /opt/buildtools/prepare_environment.sh amd64-linux
+    script:
+      - mkdir build
+      - cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_DAP_SDK_TESTS=ON && make -j$(nproc) && ctest
+
+linux-arm32v7-tests:
+    extends: .tests
+    image: demlabs/arm32v7/debian-bullseye:linuxbuilder
+    before_script: /opt/buildtools/prepare_environment.sh arm32v7-linux
+    script:
+      - mkdir build
+      - cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_DAP_SDK_TESTS=ON && make -j$(nproc) && ctest
+
+linux-arm64v8-tests:
+    extends: .tests
+    image: demlabs/arm64v8/debian-bullseye:linuxbuilder
+    before_script: /opt/buildtools/prepare_environment.sh arm64-linux
+    script:
+      - mkdir build
+      - cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_DAP_SDK_TESTS=ON && make -j$(nproc) && ctest
+
+windows-tests:
+    extends: .tests
+    image: demlabs/amd64/debian-bullseye:windowsbuilder
+    before_script: /opt/buildtools/prepare_environment.sh amd64-windows
+    script:
+      - mkdir build
+      - cd build && export PATH=${MXE_ROOT}/usr/bin:$PATH && x86_64-w64-mingw32.static-cmake .. -DCMAKE_BUILD_TYPE=Release && make -j$(nproc)
+    
+
+macos-tests:
+    extends: .tests
+    image: demlabs/amd64/debian-bullseye:osxbuilder
+    before_script: /opt/buildtools/prepare_environment.sh amd64-windows
+    script:
+      - mkdir build
+      - cd build && $(${OSXCROSS_ROOT}/bin/osxcross-conf) && export OSXCROSS_NO_INCLUDE_PATH_WARNINGS=1 && export OSXCROSS_HOST=x86_64-apple-darwin20.4 && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${OSXCROSS_ROOT}/toolchain.cmake -DBoost_INCLUDE_DIR=$BOOST_INCLUDE_DIR .. && make -j$(nproc)
-- 
GitLab


From 067b9a72db2733f6c94e6177933c7e0fa7b81842 Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Wed, 1 Nov 2023 17:55:37 +0700
Subject: [PATCH 17/21] [*] Fixed build in Windows

---
 examples/CMakeLists.txt | 6 +++---
 examples/rng_example.c  | 3 +--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 7daf1f2f1..6bf0b8f2a 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,9 +1,9 @@
 cmake_minimum_required(VERSION 3.10)
-project(examples C)
+project(rng_example C)
 
 set(CMAKE_C_STANDARD 11)
 
-add_executable(rng_example rng_example.c)
+add_executable(${PROJECT_NAME} rng_example.c)
 
 #target_include_directories(rng_example INTERFACE
 #        ../3rdparty
@@ -14,5 +14,5 @@ add_executable(rng_example rng_example.c)
 #        ../crypto/src/XKCP/lib/common
 #        )
 
-target_link_libraries( rng_example
+target_link_libraries(${PROJECT_NAME}
         dap_core dap_crypto)
diff --git a/examples/rng_example.c b/examples/rng_example.c
index 182744d87..89e05e3e8 100644
--- a/examples/rng_example.c
+++ b/examples/rng_example.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
-#include "../crypto/src/rand/dap_rand.h"
+#include "rand/dap_rand.h"
 #include "dap_math_ops.h"
-//#include "dap_chain_common.h"
 
 #define NUMBER_OF_BITSTREAMS 100
 #define NUMBER_OF_ELEMENTS 1024 * 4
-- 
GitLab


From 70504599859389b8f9ee33da28f8eeb2a4eec051 Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Wed, 1 Nov 2023 17:56:18 +0700
Subject: [PATCH 18/21] [-] Removed old math tests.

---
 core/test/math/unit_test.cpp      | 252 ---------
 core/test/uint256_t/unit_test.cpp | 898 ------------------------------
 2 files changed, 1150 deletions(-)
 delete mode 100644 core/test/math/unit_test.cpp
 delete mode 100644 core/test/uint256_t/unit_test.cpp

diff --git a/core/test/math/unit_test.cpp b/core/test/math/unit_test.cpp
deleted file mode 100644
index c37afbddb..000000000
--- a/core/test/math/unit_test.cpp
+++ /dev/null
@@ -1,252 +0,0 @@
-#include <boost/multiprecision/cpp_int.hpp>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "dap_math_ops.h"
-#include <cmath>
-#include <iostream>
-#include <fstream>
-
-int main()
-{
-   using namespace boost::multiprecision;
-
-   //density constant value=2147483646
-   std::uint64_t i;
-   std::uint64_t j;
-   std::uint64_t k;
-   std::uint64_t l;
-   std::uint64_t msb_one=0x7fffffffffffffff;
-   std::uint64_t lsb_one=1;
-   boost::uint64_t max_64=(std::numeric_limits<boost::uint64_t>::max)();
-   int density_constant=40000;
-   //2147483646
-   int density_index;
-   int error_counter_sum_64_128=0;
-    
-    
-   unsign256_t dap_test_256_one;
-   unsign256_t dap_test_256_two;
-   unsign256_t dap_test_256_sum;   
-   int overflow_flag;
-
-   //otherwise the sum structure is filled with garbage
-   dap_test_256_sum.lo.lo=0;
-   dap_test_256_sum.lo.hi=0;
-   dap_test_256_sum.hi.lo=0;
-   dap_test_256_sum.hi.hi=0;
-
-   std::ofstream sum_256_256_file;
-   sum_256_256_file.open ("SUM_256_256.txt");  
-
-   std::ofstream prod_64_128_file;
-   prod_64_128_file.open ("PROD_64_128.txt");  
-
-
-   uint128_t hi_64{"0xffffffffffffffff0000000000000000"};
-   uint128_t lo_64{"0x0000000000000000ffffffffffffffff"};
-   uint128_t max_128{"0xffffffffffffffffffffffffffffffff"};
-
-   uint128_t two_64{"0x000000000000000010000000000000000"};
-
-
-
-   uint256_t boost_two_64{"0x00000000000000000000000000000000010000000000000000"};
-   uint256_t boost_two_128{"0x0000000000000000100000000000000000000000000000000"};
-   uint256_t boost_two_192{"0x1000000000000000000000000000000000000000000000000"};
-
-
-   
-   uint256_t boost_test_256_one;
-   uint256_t boost_test_256_two;
-   uint256_t boost_test_256_sum;
-   
-   uint256_t boost_dap_256_comparison;
-
-
-   
-   uint128_t boost_dap_64_128_comparison;
-
-   int error_counter_sum=0;
-   int error_counter_prod=0;
-   int verbose_output=0;
-
-
-   for (density_index = 0; density_index<density_constant; density_index+=1000){
-
-        i=density_index;
-        j=2*density_index;
-        k=3*density_index;
-        l=4*density_index;
-
-        dap_test_256_one.lo.lo=i;
-        dap_test_256_one.lo.hi=j;
-        dap_test_256_one.hi.lo=k;
-        dap_test_256_one.hi.hi=l;
-
-
-        uint256_t boost_test_256_one_coeff_2_0=i;               
-        uint256_t boost_test_256_one_coeff_2_64=j;
-        uint256_t boost_test_256_one_coeff_2_128=k;
-        uint256_t boost_test_256_one_coeff_2_192=l;
-
-
-
-        boost_test_256_one=boost_test_256_one_coeff_2_0 + boost_test_256_one_coeff_2_64*boost_two_64
-        +boost_test_256_one_coeff_2_128*boost_two_128+boost_test_256_one_coeff_2_192*boost_two_192;
-
-
-        i=max_64-(density_index+1);
-        j=max_64-2*(density_index+1);
-        k=max_64-3*(density_index+1);
-        l=max_64-4*(density_index+1);
-        dap_test_256_two.lo.lo=i;
-        dap_test_256_two.lo.hi=j;
-        dap_test_256_two.hi.lo=k;
-        dap_test_256_two.hi.hi=l;
-
-        uint256_t boost_test_256_two_coeff_2_0=i;               
-        uint256_t boost_test_256_two_coeff_2_64=j;
-        uint256_t boost_test_256_two_coeff_2_128=k;
-        uint256_t boost_test_256_two_coeff_2_192=l;
-
-
-        boost_test_256_two=boost_test_256_two_coeff_2_0 + boost_test_256_two_coeff_2_64*boost_two_64
-        +boost_test_256_two_coeff_2_128*boost_two_128+boost_test_256_two_coeff_2_192*boost_two_192;
-
-       
-
-//        add(boost_add_256, i, j);
-        overflow_flag=SUM_256_256(dap_test_256_one,dap_test_256_two,&dap_test_256_sum);
-        boost_test_256_sum=add(boost_test_256_sum,boost_test_256_one,boost_test_256_two);
-        
-        boost_dap_256_comparison=dap_test_256_sum.lo.lo+dap_test_256_sum.lo.hi*boost_two_64+
-        dap_test_256_sum.hi.lo*boost_two_128+dap_test_256_sum.hi.hi*boost_two_192;
-
-        if(boost_dap_256_comparison!=boost_test_256_sum){
-        error_counter_sum+=1;
-        sum_256_256_file << "incorrect output for density index=" << std::endl;
-        sum_256_256_file << density_index << std::endl;}
-        
-
-
-//        unsign128_t dap_test_64_128_prod;
-//        uint128_t boost_test_64_128_prod;
-//        uint128_t boost_dap_128_prod_comparison;
-//        
-//        multiply(boost_test_64_128_prod, i, j);
-//        MULT_64_128(i,j,dap_test_64_128_prod);
-//        boost_dap_128_prod_comparison=dap_test_64_128_prod.lo+dap_test_64_128_prod.hi*hi_64;
-//        
-//        if(boost_dap_128_prod_comparison!=boost_test_64_128_prod){
-//            error_counter_prod+=1;}
-        
-
-        
-        if(verbose_output==1){
-
-        if(boost_dap_256_comparison!=boost_test_256_sum){
-
-        sum_256_256_file << "dap_test_256_one"<< std::endl;
-
-        sum_256_256_file << (dap_test_256_one.lo.lo)<< std::endl;
-        sum_256_256_file << (dap_test_256_one.lo.hi)<< std::endl;
-        sum_256_256_file << (dap_test_256_one.hi.lo)<< std::endl;
-        sum_256_256_file << (dap_test_256_one.hi.hi)<< std::endl;
-
-
-        sum_256_256_file << "dap_test_256_two"<< std::endl;
-
-        sum_256_256_file << (dap_test_256_two.lo.lo)<< std::endl;
-        sum_256_256_file << (dap_test_256_two.lo.hi)<< std::endl;
-        sum_256_256_file << (dap_test_256_two.hi.lo)<< std::endl;
-        sum_256_256_file << (dap_test_256_two.hi.hi)<< std::endl;
-
-        sum_256_256_file << "dap_test_256_sum"<< std::endl;
-
-        sum_256_256_file << (dap_test_256_sum.lo.lo)<< std::endl;
-        sum_256_256_file << (dap_test_256_sum.lo.hi)<< std::endl;
-        sum_256_256_file << (dap_test_256_sum.hi.lo)<< std::endl;
-        sum_256_256_file << (dap_test_256_sum.hi.hi)<< std::endl;
-
-        sum_256_256_file << "boost_test_256_one"<< std::endl;
-
-        sum_256_256_file << (boost_test_256_one)<< std::endl;
-    
-        sum_256_256_file << "boost_test_256_one factor 0"<< std::endl;
-
-        sum_256_256_file << (boost_test_256_one_coeff_2_0)<< std::endl;
-    
-        sum_256_256_file << "boost_test_256_one factor 1"<< std::endl;
-
-        sum_256_256_file << (boost_test_256_one_coeff_2_64*boost_two_64)<< std::endl;
-
-        sum_256_256_file << "boost_test_256_one factor 2"<< std::endl;
-
-        sum_256_256_file << (boost_test_256_one_coeff_2_128*boost_two_128)<< std::endl;
-    
-
-        sum_256_256_file << "boost_test_256_one factor 3"<< std::endl;
-
-        sum_256_256_file << (boost_test_256_one_coeff_2_192*boost_two_192)<< std::endl;
-
-
-
-        sum_256_256_file << "boost_test_256_two"<< std::endl;
-
-        sum_256_256_file << (boost_test_256_two)<< std::endl;
-
-
-        sum_256_256_file << "boost sum is"<< std::endl;
-
-
-        sum_256_256_file << (boost_test_256_sum)<< std::endl;
-
-        sum_256_256_file << "boost comparison is"<< std::endl;
-
-
-        sum_256_256_file << (boost_dap_256_comparison)<< std::endl;}
-
-    
-//        if(boost_dap_256_comparison!=boost_test_256_sum){
-//
-//        prod_64_128_file << "boost_dap_128_prod_comparison"<< std::endl;
-//
-//        prod_64_128_file << (boost_dap_128_prod_comparison)<< std::endl;
-//
-//        prod_64_128_file << "boost_test_64_128_prod"<< std::endl;
-//
-//        prod_64_128_file << (boost_test_64_128_prod)<< std::endl;
-//
-//}
-//
-
-
-
-
-
-
-}
-  
-        
-    overflow_flag=0;
-
-    }
-
-    
-    sum_256_256_file.close();
-
-   if(error_counter_sum==0){
-
-    std::cout<< "SUM_256_256 returns identical results to boost:: 256 bit addition"<< std::endl;}
-
-//
-//   if(error_counter_prod==0){
-//
-//   std::cout<< "SUM_256_256 returns identical results to boost:: 256 bit addition"<< std::endl;}
-
-
-   return 0;
-}
-
-
diff --git a/core/test/uint256_t/unit_test.cpp b/core/test/uint256_t/unit_test.cpp
deleted file mode 100644
index ac4371c00..000000000
--- a/core/test/uint256_t/unit_test.cpp
+++ /dev/null
@@ -1,898 +0,0 @@
-#include <boost/multiprecision/cpp_int.hpp>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "dap_math_ops.h"
-#include <cmath>
-#include <iostream>
-#include <fstream>
-
-enum testing_mode{
-FULL=0,
-BASIC=1,
-SQUARE=2,   
-};
-
-int main()
-{
-   //using namespace boost::multiprecision;
-
-   //density constant value=2147483646
-   std::uint64_t i;
-   std::uint64_t j;
-   std::uint64_t k;
-   std::uint64_t l;
-   std::uint64_t msb_one=0x7fffffffffffffff;
-   std::uint64_t lsb_one=1;
-   boost::uint64_t max_64=(std::numeric_limits<boost::uint64_t>::max)();
-   
-
-   /////testing output parameters
-   int verbose_output=1;
-   int testing_mode=0;
-   int density_constant=200;
-   int division_enabled=0;
-
-
-   //2147483646
-   int density_index=0;
-   
-   int error_counter_sum_64_128=0;
-    
-   uint128_t dap_test_128_shift={.hi=0, .lo=0}; 
-   uint128_t dap_test_128_one={.hi=0, .lo=0};
-   uint128_t dap_test_128_two={.hi=0, .lo=0};
-   uint128_t dap_test_128_sub={.hi=0, .lo=0};
-   uint256_t dap_test_256_one={.hi=zero_128, .lo=zero_128};
-   uint256_t dap_test_256_two={.hi=zero_128, .lo=zero_128};
-   uint256_t dap_test_256_sum={.hi=zero_128, .lo=zero_128}; 
-   uint256_t dap_test_256_sub={.hi=zero_128, .lo=zero_128}; 
-   uint256_t dap_test_256_prod={.hi=zero_128, .lo=zero_128};
-   uint256_t dap_test_256_shift={.hi=zero_128, .lo=zero_128};
-   uint512_t dap_test_512_prod={.hi=zero_256, .lo=zero_256};
-   int overflow_flag;
-   int overflow_flag_prod;
-   int borrow_flag_128;
-   int borrow_flag_256;
-
-   //otherwise the sum structure is filled with garbage
-   dap_test_256_sum.lo.lo=0;
-   dap_test_256_sum.lo.hi=0;
-   dap_test_256_sum.hi.lo=0;
-   dap_test_256_sum.hi.hi=0;
-
-   std::ofstream sum_256_256_file;
-   sum_256_256_file.open ("SUM_256_256.txt");  
-
-   std::ofstream sub_128_128_file;
-   sub_128_128_file.open ("SUB_128_128.txt");  
-    
-   std::ofstream sub_256_256_file;
-   sub_256_256_file.open ("SUB_256_256.txt");  
-
-   std::ofstream prod_64_128_file;
-   prod_64_128_file.open ("PROD_64_128.txt");  
-
-   std::ofstream prod_128_128_file;
-   prod_128_128_file.open ("PROD_128_128.txt");  
-
-   std::ofstream prod_128_256_file;
-   prod_128_256_file.open ("PROD_128_256.txt");  
-
-   std::ofstream prod_256_256_file;
-   prod_256_256_file.open ("PROD_256_256.txt");  
-
-   std::ofstream prod_256_512_file;
-   prod_256_512_file.open ("PROD_256_512.txt"); 
-
-   std::ofstream shift_left_128_file;
-   shift_left_128_file.open ("SHIFT_LEFT_128.txt");  
-
-   std::ofstream shift_left_256_file;
-   shift_left_256_file.open ("SHIFT_LEFT_256.txt");  
-
-if (division_enabled==1){
-   std::ofstream quot_128_file;
-   quot_128_file.open ("QUOT_128.txt");  
-}
-
-
-   boost::multiprecision::uint128_t hi_64{"0xffffffffffffffff0000000000000000"};
-   boost::multiprecision::uint128_t lo_64{"0x0000000000000000ffffffffffffffff"};
-   boost::multiprecision::uint128_t max_128{"0xffffffffffffffffffffffffffffffff"};
-   boost::multiprecision::uint128_t two_64{"0x000000000000000010000000000000000"};
-
-   boost::multiprecision::uint256_t boost_two_64{"0x00000000000000000000000000000000010000000000000000"};
-   boost::multiprecision::uint256_t boost_two_128{"0x0000000000000000100000000000000000000000000000000"};
-   boost::multiprecision::uint256_t boost_two_192{"0x1000000000000000000000000000000000000000000000000"};
-
-   boost::multiprecision::uint512_t boost_two_64_for_512_calc{"0x00000000000000000000000000000000010000000000000000"};
-   boost::multiprecision::uint512_t boost_two_128_for_512_calc{"0x0000000000000000100000000000000000000000000000000"};
-   boost::multiprecision::uint512_t boost_two_192_for_512_calc{"0x1000000000000000000000000000000000000000000000000"};
-   boost::multiprecision::uint512_t boost_two_256_for_512_calc{"0x000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000"};
-
-    boost::multiprecision::uint512_t boost_two_320_for_512_calc{"0x100000000000000000000000000000000000000000000000000000000000000000000000000000000"};
-    boost::multiprecision::uint512_t boost_two_384_for_512_calc{"0x1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"};
-    boost::multiprecision::uint512_t boost_two_448_for_512_calc{"0x10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"};
-
-    boost::multiprecision::uint128_t boost_two_64_for_128_calc{"0x000000000000000010000000000000000"};   
-
-    
-
-
-   boost::multiprecision::uint256_t boost_test_256_one{"0x0000000000000000000000000000000000000000000000000"};
-   boost::multiprecision::uint256_t boost_test_256_two{"0x0000000000000000000000000000000000000000000000000"};
-   boost::multiprecision::uint256_t boost_test_256_sum{"0x0000000000000000000000000000000000000000000000000"};
-   boost::multiprecision::uint256_t boost_test_256_sub{"0x0000000000000000000000000000000000000000000000000"};
-   boost::multiprecision::uint256_t boost_test_256_prod{"0x0000000000000000000000000000000000000000000000000"};
-   boost::multiprecision::uint256_t boost_test_512_prod_hi_prod{"0x0000000000000000000000000000000000000000000000000"};
-   boost::multiprecision::uint256_t boost_test_512_prod_lo_prod{"0x0000000000000000000000000000000000000000000000000"};
-    
-
-   boost::multiprecision::uint512_t boost_test_2_256_quotient{"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"};
-   boost::multiprecision::uint512_t boost_test_2_256_remainder{"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"};
-   boost::multiprecision::uint512_t boost_test_512_prod{"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}; 
-
-   boost::multiprecision::uint128_t boost_test_128_one{"0x000000000000000000000000000000000"};
-   boost::multiprecision::uint128_t boost_test_128_two{"0x000000000000000000000000000000000"};
-   boost::multiprecision::uint128_t boost_test_128_sub{"0x000000000000000000000000000000000"};
-   boost::multiprecision::uint128_t boost_test_256_one_lo{"0x000000000000000000000000000000000"};
-   boost::multiprecision::uint128_t boost_test_256_one_hi{"0x000000000000000000000000000000000"};
-   boost::multiprecision::uint128_t boost_test_256_two_lo{"0x000000000000000000000000000000000"};
-   boost::multiprecision::uint128_t boost_test_256_two_hi{"0x000000000000000000000000000000000"};
-   boost::multiprecision::uint128_t boost_dap_64_128_comparison{"0x000000000000000000000000000000000"};
-   boost::multiprecision::uint128_t boost_test_shift_left_128{"0x000000000000000000000000000000000"};   
-   boost::multiprecision::uint128_t boost_test_shift_left_128_quotient_limb{"0x000000000000000000000000000000000"};
-   boost::multiprecision::uint128_t boost_test_shift_left_128_remainder_limb{"0x000000000000000000000000000000000"};
-   boost::multiprecision::uint128_t boost_dap_comparison_shift_left_128{"0x000000000000000000000000000000000"};    
-   boost::multiprecision::uint128_t boost_test_64_128_prod{"0x000000000000000000000000000000000"};
-   boost::multiprecision::uint128_t boost_dap_128_prod_comparison{"0x000000000000000000000000000000000"};    
-   boost::multiprecision::uint128_t boost_dap_128_comparison_sub{"0x000000000000000000000000000000000"};
-    
-   boost::multiprecision::uint256_t boost_dap_256_comparison{"0x0000000000000000000000000000000000000000000000000"};
-   boost::multiprecision::uint256_t boost_dap_256_comparison_sub{"0x0000000000000000000000000000000000000000000000000"};
-   boost::multiprecision::uint256_t boost_dap_256_comparison_prod{"0x0000000000000000000000000000000000000000000000000"}; 
-   boost::multiprecision::uint256_t boost_test_shift_left_256{"0x0000000000000000000000000000000000000000000000000"};
-   boost::multiprecision::uint256_t boost_dap_comparison_shift_left_256{"0x0000000000000000000000000000000000000000000000000"};
-    
-   boost::multiprecision::uint512_t boost_dap_512_comparison_prod{"0x0"}; 
-   
-
-
-    
-   int error_counter_sum=0;
-   int error_counter_prod=0;
-   int error_counter_sub_128=0;
-   int error_counter_sub_256=0;
-   int error_counter_prod_128_128=0;
-   int error_counter_prod_128_256=0;    
-   int error_counter_prod_256_256=0;
-   int error_counter_prod_256_512=0;
-   int error_counter_shift_left_128=0;
-   int error_counter_shift_left_256=0; 
-   int error_counter_quot_128=0;   
-   
-
-
-   for (density_index = 0; density_index<density_constant; density_index+=1){
-
-
-        /////////////////////output of 256+256-->256//////////////////////
-
-        if (testing_mode==FULL){
-        i=density_index;
-        j=2*density_index;
-        k=3*density_index;
-        l=4*density_index;
-        }
-        if (testing_mode==BASIC){
-        i=density_index;
-        j=density_index;
-        k=density_index;
-        l=density_index;
-        }
-
-        if (testing_mode==SQUARE){
-        i=density_index;
-        j=density_index;
-        k=density_index;
-        l=density_index;
-        }
-        
-
-        dap_test_256_one.lo.lo=i;
-        dap_test_256_one.lo.hi=j;
-        dap_test_256_one.hi.lo=k;
-        dap_test_256_one.hi.hi=l;
-
-
-        boost::multiprecision::uint256_t boost_test_256_one_coeff_2_0=i;               
-        boost::multiprecision::uint256_t boost_test_256_one_coeff_2_64=j;
-        boost::multiprecision::uint256_t boost_test_256_one_coeff_2_128=k;
-        boost::multiprecision::uint256_t boost_test_256_one_coeff_2_192=l;
-
-
-
-        boost_test_256_one=boost_test_256_one_coeff_2_0 + boost_test_256_one_coeff_2_64*boost_two_64
-        +boost_test_256_one_coeff_2_128*boost_two_128+boost_test_256_one_coeff_2_192*boost_two_192;
-        
-//        boost_test_256_one_hi=boost_test_256_one_coeff_2_128+boost_two_64*boost_test_256_one_coeff_2_192;
-//        boost_test_256_one_lo=boost_test_256_one_coeff_2_0+boost_test_256_one_coeff_2_64*boost_two_64;
-    
-        if(testing_mode==FULL){
-        i=max_64-(density_index+1);
-        j=max_64-2*(density_index+1);
-        k=max_64-3*(density_index+1);
-        l=max_64-4*(density_index+1);
-        }
-
-        if (testing_mode==BASIC){
-        i=density_index+1;
-        j=density_index+1;
-        k=density_index+1;
-        l=density_index+1;
-        }
-
-        if (testing_mode==SQUARE){
-        i=density_index;
-        j=density_index;
-        k=density_index;
-        l=density_index;  
-        }
-        
-
-        dap_test_256_two.lo.lo=i;
-        dap_test_256_two.lo.hi=j;
-        dap_test_256_two.hi.lo=k;
-        dap_test_256_two.hi.hi=l;
-       
-
-        boost::multiprecision::uint256_t boost_test_256_two_coeff_2_0=i;               
-        boost::multiprecision::uint256_t boost_test_256_two_coeff_2_64=j;
-        boost::multiprecision::uint256_t boost_test_256_two_coeff_2_128=k;
-        boost::multiprecision::uint256_t boost_test_256_two_coeff_2_192=l;
-
-
-        boost_test_256_two=boost_test_256_two_coeff_2_0 + boost_test_256_two_coeff_2_64*boost_two_64
-        +boost_test_256_two_coeff_2_128*boost_two_128+boost_test_256_two_coeff_2_192*boost_two_192;
-
-//        boost_test_256_two_hi=boost_test_256_two_coeff_2_128+boost_two_64*boost_test_256_two_coeff_2_192;
-//        boost_test_256_two_lo=boost_test_256_one_coeff_2_0+boost_test_256_two_coeff_2_64*boost_two_64;
-
-//        add(boost_add_256, i, j);
-        
-        overflow_flag=SUM_256_256(dap_test_256_one,dap_test_256_two,&dap_test_256_sum);
-        add(boost_test_256_sum,boost_test_256_one,boost_test_256_two);
-        
-        boost_dap_256_comparison=dap_test_256_sum.lo.lo+dap_test_256_sum.lo.hi*boost_two_64+
-        dap_test_256_sum.hi.lo*boost_two_128+dap_test_256_sum.hi.hi*boost_two_192;
-
-        if(boost_dap_256_comparison!=boost_test_256_sum){
-        error_counter_sum+=1;
-        sum_256_256_file << "incorrect output for density index=" << std::endl;
-        sum_256_256_file << density_index << std::endl;}
-
-    
-        ///256 bit subtraction
-
-        borrow_flag_256=SUBTRACT_256_256(dap_test_256_two,dap_test_256_one,&dap_test_256_sub);
-        subtract(boost_test_256_sub,boost_test_256_two,boost_test_256_one);
-        
-        boost_dap_256_comparison_sub=dap_test_256_sub.lo.lo+dap_test_256_sub.lo.hi*boost_two_64+
-        dap_test_256_sub.hi.lo*boost_two_128+dap_test_256_sub.hi.hi*boost_two_192;
-
-        if(boost_dap_256_comparison_sub!=boost_test_256_sub){
-        error_counter_sub_256+=1;
-        sub_256_256_file << "incorrect output for density index=" << std::endl;
-        sub_256_256_file << density_index << std::endl;}
-
-        
-
-
-
-        /////////////////////output of 256*256-->256//////////////////////
-
-        overflow_flag_prod=MULT_256_256(dap_test_256_one,dap_test_256_two,&dap_test_256_prod);
-        multiply(boost_test_256_prod,boost_test_256_one,boost_test_256_two);
-        multiply(boost_test_512_prod,boost_test_256_one,boost_test_256_two);
-//        multiply(boost_test_512_prod_hi_prod,boost_test_256_one_hi,boost_test_256_two_hi);
-//        multiply(boost_test_512_prod_lo_prod,boost_test_256_one_lo,boost_test_256_two_lo);
-        divide_qr(boost_test_512_prod,boost_two_256_for_512_calc,boost_test_2_256_quotient,boost_test_2_256_remainder);
-
-        boost_dap_256_comparison_prod=dap_test_256_prod.lo.lo+dap_test_256_prod.lo.hi*boost_two_64+
-        dap_test_256_prod.hi.lo*boost_two_128+dap_test_256_prod.hi.hi*boost_two_192;
-
-        if(boost_dap_256_comparison_prod!=boost_test_256_prod){
-        error_counter_prod_256_256+=1;
-        prod_256_256_file << "incorrect product output for density index=" << std::endl;
-        prod_256_256_file << density_index << std::endl;}
-
-        /////////////////////output of 256*256-->512//////////////////////
-        dap_test_512_prod.lo=zero_256;
-        dap_test_512_prod.hi=zero_256;
-        uint256_t intermed_lo_prod;
-        uint256_t intermed_hi_prod;
-        MULT_128_256(dap_test_256_one.lo,dap_test_256_two.lo,&intermed_lo_prod);
-        MULT_128_256(dap_test_256_one.hi,dap_test_256_two.hi,&intermed_hi_prod);
-        
-        MULT_256_512(dap_test_256_one,dap_test_256_two,&dap_test_512_prod);
-
-
-        boost_dap_512_comparison_prod=dap_test_512_prod.lo.lo.lo+
-        dap_test_512_prod.lo.lo.hi*boost_two_64_for_512_calc+
-        dap_test_512_prod.lo.hi.lo*boost_two_128_for_512_calc+
-        dap_test_512_prod.lo.hi.hi*boost_two_192_for_512_calc+
-        dap_test_512_prod.hi.lo.lo*boost_two_256_for_512_calc+
-        dap_test_512_prod.hi.lo.hi*boost_two_320_for_512_calc+
-        dap_test_512_prod.hi.hi.lo*boost_two_384_for_512_calc+
-        dap_test_512_prod.hi.hi.hi*boost_two_448_for_512_calc;
-
-        if(boost_dap_512_comparison_prod!=boost_test_512_prod){
-        error_counter_prod_256_512+=1;
-        prod_256_512_file << "incorrect product output for density index=" << std::endl;
-        prod_256_512_file << density_index << std::endl;}
-
-        /////////////////////output of shift left 128/////////////////////
-        
-        if (density_index<=127){
-        dap_test_128_one=dap_test_256_one.lo;
-        LEFT_SHIFT_128(dap_test_128_one,&dap_test_128_shift,density_index);
-
-        boost_test_128_one=dap_test_128_one.lo+dap_test_128_one.hi*boost_two_64_for_128_calc;
-        boost_test_shift_left_128=boost_test_128_one<<density_index;
-        boost_dap_comparison_shift_left_128=dap_test_128_shift.lo+dap_test_128_shift.hi*boost_two_64_for_128_calc;
-
-                 divide_qr(boost_test_shift_left_128,boost_two_64_for_128_calc,boost_test_shift_left_128_quotient_limb,boost_test_shift_left_128_remainder_limb);
-        
-        if(boost_dap_comparison_shift_left_128!=boost_test_shift_left_128){
-        error_counter_shift_left_128+=1;
-        shift_left_128_file << "incorrect shift left 128 output for density index=" << std::endl;
-        shift_left_128_file << density_index << std::endl;}
-        }
-        /////////////////////output of shift left 256/////////////////////
-        
-        if (density_index<=255){
-        LEFT_SHIFT_256(dap_test_256_one,&dap_test_256_shift,density_index);
-
-        boost_test_256_one=boost_test_256_one_coeff_2_0 + boost_test_256_one_coeff_2_64*boost_two_64
-        +boost_test_256_one_coeff_2_128*boost_two_128+boost_test_256_one_coeff_2_192*boost_two_192;
-        boost_test_shift_left_256=boost_test_256_one<<density_index;
-        boost_dap_comparison_shift_left_256=dap_test_256_shift.lo.lo+dap_test_256_shift.lo.hi*boost_two_64+
-        dap_test_256_shift.hi.lo*boost_two_128+dap_test_256_shift.hi.hi*boost_two_192;
-
-        
-        if(boost_dap_comparison_shift_left_256!=boost_test_shift_left_256){
-        error_counter_shift_left_256+=1;
-        shift_left_256_file << "incorrect shift left 256 output for density index=" << std::endl;
-        shift_left_256_file << density_index << std::endl;}
-        }
-    
-        /////////////////////output of 64*64-->128////////////////////////
-
-
-        i=density_index;
-        j=max_64-(density_index+1);
-        uint128_t dap_test_64_128_prod;
-        dap_test_64_128_prod.lo=0;
-        dap_test_64_128_prod.hi=0;
- 
-
-
-        multiply(boost_test_64_128_prod, i, j);
-        MULT_64_128(i,j,&dap_test_64_128_prod);
-        boost_dap_128_prod_comparison=dap_test_64_128_prod.lo+dap_test_64_128_prod.hi*two_64;
-        
-        if(boost_dap_128_prod_comparison!=boost_test_64_128_prod){
-            error_counter_prod+=1;}
-
-        /////////////////////output of 128*128-->128////////////////////////
-
-        uint128_t dap_test_128_128_prod_one;
-        uint128_t dap_test_128_128_prod_two;
-        uint128_t dap_test_128_128_prod_prod;
-        dap_test_128_128_prod_one.lo=i;
-        dap_test_128_128_prod_one.hi=j;
-        dap_test_128_128_prod_two.lo=max_64-(i+1);
-        dap_test_128_128_prod_two.hi=max_64-2*(j+1);
-        dap_test_128_128_prod_prod.lo=0;
-        dap_test_128_128_prod_prod.hi=0;
-        
-        boost::multiprecision::uint128_t boost_test_128_128_prod;
-        boost::multiprecision::uint128_t boost_test_128_128_one;
-        boost::multiprecision::uint128_t boost_test_128_128_two;   
-        boost::multiprecision::uint128_t boost_dap_128_128_prod_comparison;
-
-        ////compute boost "factors"
-        boost_test_128_128_one=i+j*boost_two_64_for_128_calc;
-        boost_test_128_128_two=max_64-(i+1)+(max_64-2*(j+1))*boost_two_64_for_128_calc;
-        
-        
-        multiply(boost_test_128_128_prod, boost_test_128_128_one, boost_test_128_128_two);
-        MULT_128_128(dap_test_128_128_prod_one,dap_test_128_128_prod_two,&dap_test_128_128_prod_prod);
-        boost_dap_128_128_prod_comparison=dap_test_128_128_prod_prod.lo+dap_test_128_128_prod_prod.hi*boost_two_64_for_128_calc;
-        
-        if(boost_dap_128_128_prod_comparison!=boost_test_128_128_prod){
-            error_counter_prod_128_128+=1;}
-
-
-        ///128 bit subtraction
-
-        borrow_flag_128=SUBTRACT_128_128(dap_test_128_one,dap_test_128_two,&dap_test_128_sub);
-        subtract(boost_test_128_sub,boost_test_128_one,boost_test_128_two);
-        
-        boost_dap_128_comparison_sub=dap_test_128_sub.lo+dap_test_128_sub.hi*boost_two_64_for_128_calc;
-        
-
-        if(boost_dap_128_comparison_sub!=boost_test_128_sub){
-        error_counter_sub_128+=1;
-        sub_128_128_file << "incorrect output for density index=" << std::endl;
-        sub_128_128_file << density_index << std::endl;}
-
-        
-
-
-
-        /////////////////////output of 128*128-->256////////////////////////
-
-        
-        uint128_t dap_test_128_256_prod_one;
-        uint128_t dap_test_128_256_prod_two;
-        uint256_t dap_test_128_256_prod_prod;
-        dap_test_128_256_prod_one.lo=i;
-        dap_test_128_256_prod_one.hi=j;
-        dap_test_128_256_prod_two.lo=max_64-(i+1);
-        dap_test_128_256_prod_two.hi=max_64-2*(j+1);
-        dap_test_128_256_prod_prod.lo=zero_128;
-        dap_test_128_256_prod_prod.hi=zero_128;
-        
-        boost::multiprecision::uint256_t boost_test_128_256_prod;
-        boost::multiprecision::uint128_t boost_test_128_256_one;
-        boost::multiprecision::uint128_t boost_test_128_256_two;   
-        boost::multiprecision::uint256_t boost_dap_128_256_prod_comparison;
-
-        ////compute boost "factors"
-        boost_test_128_256_one=i+j*boost_two_64_for_128_calc;
-        boost_test_128_256_two=(max_64-(i+1))+(max_64-2*(j+1))*boost_two_64_for_128_calc;
-        
-        multiply(boost_test_128_256_prod, boost_test_128_256_one, boost_test_128_256_two);
-        MULT_128_256(dap_test_128_256_prod_one,dap_test_128_256_prod_two,&dap_test_128_256_prod_prod);
-        boost_dap_128_256_prod_comparison=dap_test_128_256_prod_prod.lo.lo+
-        dap_test_128_256_prod_prod.lo.hi*boost_two_64+
-        dap_test_128_256_prod_prod.hi.lo*boost_two_128+
-        dap_test_128_256_prod_prod.hi.hi*boost_two_192;
-    
-
-        
-        if(boost_dap_128_256_prod_comparison!=boost_test_128_256_prod){
-            
-            error_counter_prod_128_256+=1;
-
-            std::cout << ("boost_dap_128_256_prod_comparison")<< std::endl;
-            std::cout << (boost_dap_128_256_prod_comparison)<< std::endl;
-            std::cout << ("boost_test_128_256_prod")<< std::endl;
-            std::cout << (boost_test_128_256_prod)<< std::endl;}
-
-
-        /////////////////////output of 128/128-->128////////////////////////
-if(division_enabled==1){
-
-        i=density_index+1;
-        j=density_index+2;
-        uint128_t dap_test_128_quot_one;
-        uint128_t dap_test_128_quot_two;
-        uint128_t dap_test_128_quot_quot;
-        uint128_t dap_test_128_quot_rem;
-        dap_test_128_quot_one.lo=i;
-        dap_test_128_quot_one.hi=j;
-        dap_test_128_quot_two.lo=max_64-(i+1);
-        dap_test_128_quot_two.hi=max_64-2*(j+1);
-        dap_test_128_quot_quot.lo=0;
-        dap_test_128_quot_quot.hi=0;
-        dap_test_128_quot_rem.lo=0;
-        dap_test_128_quot_rem.hi=0;
-        
-        boost::multiprecision::uint128_t boost_test_128_quot_one;
-        boost::multiprecision::uint128_t boost_test_128_quot_two;   
-        boost::multiprecision::uint128_t boost_test_128_quot_quot;
-        boost::multiprecision::uint128_t boost_test_128_quot_rem;
-        boost::multiprecision::uint128_t boost_dap_128_quot_comparison_quot;
-        boost::multiprecision::uint128_t boost_dap_128_quot_comparison_rem;
-
-        ////compute boost "factors"
-        boost_test_128_quot_one=i+j*boost_two_64_for_128_calc;
-        boost_test_128_quot_two=(max_64-(i+1))+(max_64-2*(j+1))*boost_two_64_for_128_calc;
-        
-        divide_qr( boost_test_128_quot_two, boost_test_128_quot_one,boost_test_128_quot_quot,boost_test_128_quot_rem);
-        bindivmod128(dap_test_128_quot_one,dap_test_128_quot_two,&dap_test_128_quot_quot,&dap_test_128_quot_rem);
-
-
-        boost_dap_128_quot_comparison_quot=dap_test_128_quot_quot.lo+
-        dap_test_128_quot_quot.hi*boost_two_64_for_128_calc;
-
-        boost_dap_128_quot_comparison_rem=dap_test_128_quot_rem.lo+
-        dap_test_128_quot_rem.hi*boost_two_64_for_128_calc;
-
-        
-        if((boost_dap_128_quot_comparison_quot!=boost_test_128_quot_quot)||(boost_dap_128_quot_comparison_rem!=boost_test_128_quot_rem)){
-            
-            error_counter_quot_128+=1;
-
-            std::cout << ("boost_dap_128_quot_comparison_quot")<< std::endl;
-            std::cout << (boost_dap_128_quot_comparison_quot)<< std::endl;
-            std::cout << ("boost_dap_128_quot_comparison_rem")<< std::endl;
-            std::cout << (boost_dap_128_quot_comparison_rem)<< std::endl;}
-
-}
-
-
-        /////////////////////print to file section////////////////////////
-
-        
-        if(verbose_output==1){
-
-        if(boost_dap_256_comparison!=boost_test_256_sum){
-
-        sum_256_256_file << "dap_test_256_one"<< std::endl;
-
-        sum_256_256_file << (dap_test_256_one.lo.lo)<< std::endl;
-        sum_256_256_file << (dap_test_256_one.lo.hi)<< std::endl;
-        sum_256_256_file << (dap_test_256_one.hi.lo)<< std::endl;
-        sum_256_256_file << (dap_test_256_one.hi.hi)<< std::endl;
-
-
-        sum_256_256_file << "dap_test_256_two"<< std::endl;
-
-        sum_256_256_file << (dap_test_256_two.lo.lo)<< std::endl;
-        sum_256_256_file << (dap_test_256_two.lo.hi)<< std::endl;
-        sum_256_256_file << (dap_test_256_two.hi.lo)<< std::endl;
-        sum_256_256_file << (dap_test_256_two.hi.hi)<< std::endl;
-
-        sum_256_256_file << "dap_test_256_sum"<< std::endl;
-
-        sum_256_256_file << (dap_test_256_sum.lo.lo)<< std::endl;
-        sum_256_256_file << (dap_test_256_sum.lo.hi)<< std::endl;
-        sum_256_256_file << (dap_test_256_sum.hi.lo)<< std::endl;
-        sum_256_256_file << (dap_test_256_sum.hi.hi)<< std::endl;
-
-        sum_256_256_file << "boost_test_256_one"<< std::endl;
-
-        sum_256_256_file << (boost_test_256_one)<< std::endl;
-    
-        sum_256_256_file << "boost_test_256_one factor 0"<< std::endl;
-
-        sum_256_256_file << (boost_test_256_one_coeff_2_0)<< std::endl;
-    
-        sum_256_256_file << "boost_test_256_one factor 1"<< std::endl;
-
-        sum_256_256_file << (boost_test_256_one_coeff_2_64*boost_two_64)<< std::endl;
-
-        sum_256_256_file << "boost_test_256_one factor 2"<< std::endl;
-
-        sum_256_256_file << (boost_test_256_one_coeff_2_128*boost_two_128)<< std::endl;
-    
-
-        sum_256_256_file << "boost_test_256_one factor 3"<< std::endl;
-
-        sum_256_256_file << (boost_test_256_one_coeff_2_192*boost_two_192)<< std::endl;
-
-
-
-        sum_256_256_file << "boost_test_256_two"<< std::endl;
-
-        sum_256_256_file << (boost_test_256_two)<< std::endl;
-
-
-        sum_256_256_file << "boost sum is"<< std::endl;
-
-
-        sum_256_256_file << (boost_test_256_sum)<< std::endl;
-
-        sum_256_256_file << "boost comparison is"<< std::endl;
-
-
-        sum_256_256_file << (boost_dap_256_comparison)<< std::endl;}
-
-    
-        if(boost_dap_256_comparison_prod!=boost_test_256_prod){
-
-        prod_256_256_file << "dap_test_256_one"<< std::endl;
-
-        prod_256_256_file << (dap_test_256_one.lo.lo)<< std::endl;
-        prod_256_256_file << (dap_test_256_one.lo.hi)<< std::endl;
-        prod_256_256_file << (dap_test_256_one.hi.lo)<< std::endl;
-        prod_256_256_file << (dap_test_256_one.hi.hi)<< std::endl;
-
-
-        prod_256_256_file << "dap_test_256_two"<< std::endl;
-
-        prod_256_256_file << (dap_test_256_two.lo.lo)<< std::endl;
-        prod_256_256_file << (dap_test_256_two.lo.hi)<< std::endl;
-        prod_256_256_file << (dap_test_256_two.hi.lo)<< std::endl;
-        prod_256_256_file << (dap_test_256_two.hi.hi)<< std::endl;
-
-        prod_256_256_file << "dap_test_256_prod"<< std::endl;
-
-        prod_256_256_file << (dap_test_256_prod.lo.lo)<< std::endl;
-        prod_256_256_file << (dap_test_256_prod.lo.hi)<< std::endl;
-        prod_256_256_file << (dap_test_256_prod.hi.lo)<< std::endl;
-        prod_256_256_file << (dap_test_256_prod.hi.hi)<< std::endl;
-
-        prod_256_256_file << "boost_test_256_one"<< std::endl;
-
-        prod_256_256_file << (boost_test_256_one)<< std::endl;
-    
-        prod_256_256_file << "boost_test_256_one factor 0"<< std::endl;
-
-        prod_256_256_file << (boost_test_256_one_coeff_2_0)<< std::endl;
-    
-        prod_256_256_file << "boost_test_256_one factor 1"<< std::endl;
-
-        prod_256_256_file << (boost_test_256_one_coeff_2_64*boost_two_64)<< std::endl;
-
-        prod_256_256_file << "boost_test_256_one factor 2"<< std::endl;
-
-        prod_256_256_file << (boost_test_256_one_coeff_2_128*boost_two_128)<< std::endl;
-    
-
-        prod_256_256_file << "boost_test_256_one factor 3"<< std::endl;
-
-        prod_256_256_file << (boost_test_256_one_coeff_2_192*boost_two_192)<< std::endl;
-
-
-
-        prod_256_256_file << "boost_test_256_two"<< std::endl;
-
-        prod_256_256_file << (boost_test_256_two)<< std::endl;
-
-
-
-        prod_256_256_file << "boost_test_256_two factor 0"<< std::endl;
-
-        prod_256_256_file << (boost_test_256_two_coeff_2_0)<< std::endl;
-    
-        prod_256_256_file << "boost_test_256_two factor 1"<< std::endl;
-
-        prod_256_256_file << (boost_test_256_two_coeff_2_64*boost_two_64)<< std::endl;
-
-        prod_256_256_file << "boost_test_256_two factor 2"<< std::endl;
-
-        prod_256_256_file << (boost_test_256_two_coeff_2_128*boost_two_128)<< std::endl;
-    
-        prod_256_256_file << "boost_test_256_two factor 3"<< std::endl;
-
-        prod_256_256_file << (boost_test_256_two_coeff_2_192*boost_two_192)<< std::endl;
-
-
-        prod_256_256_file << "boost 256 prod is"<< std::endl;
-
-
-        prod_256_256_file << (boost_test_256_prod)<< std::endl;
-
-
-        prod_256_256_file << "boost 512 prod is"<< std::endl;
-
-
-        prod_256_256_file << (boost_test_512_prod)<< std::endl;
-
-
-        prod_256_256_file << "boost 2**256 quotient is"<< std::endl;
-
-
-        prod_256_256_file << (boost_test_2_256_quotient)<< std::endl;
-
-        prod_256_256_file << "boost 2**256 remainder is"<< std::endl;
-
-
-        prod_256_256_file << (boost_test_2_256_remainder)<< std::endl;
-
-        prod_256_256_file << "boost comparison is"<< std::endl;
-
-        prod_256_256_file << (boost_dap_256_comparison_prod)<< std::endl;}
-
-        if(boost_dap_512_comparison_prod!=boost_test_512_prod){
-
-
-        prod_256_512_file << "dap_test_512_prod"<< std::endl;
-
-        prod_256_512_file << (dap_test_512_prod.lo.lo.lo)<< std::endl;
-        prod_256_512_file << (dap_test_512_prod.lo.lo.hi)<< std::endl;
-        prod_256_512_file << (dap_test_512_prod.lo.hi.lo)<< std::endl;
-        prod_256_512_file << (dap_test_512_prod.lo.hi.hi)<< std::endl;
-        prod_256_512_file << (dap_test_512_prod.hi.lo.lo)<< std::endl;
-        prod_256_512_file << (dap_test_512_prod.hi.lo.hi)<< std::endl;
-        prod_256_512_file << (dap_test_512_prod.hi.hi.lo)<< std::endl;
-        prod_256_512_file << (dap_test_512_prod.hi.hi.hi)<< std::endl;
-
-
-        prod_256_512_file << "boost 512 prod is"<< std::endl;
-
-        prod_256_512_file << (boost_test_512_prod)<< std::endl;
-
-        prod_256_512_file << "boost comparison is"<< std::endl;
-
-        prod_256_512_file << (boost_dap_512_comparison_prod)<< std::endl;}
-
-
-        if(boost_test_64_128_prod!=boost_dap_128_prod_comparison){
-        
-        prod_64_128_file <<  " i is "<< std::endl;
-
-        prod_64_128_file << (i)<< std::endl;
-        
-        prod_64_128_file <<  " j is "<< std::endl;
-
-        prod_64_128_file << (j)<< std::endl;
-
-        prod_64_128_file << "boost_dap_128_prod_comparison"<< std::endl;
-
-        prod_64_128_file << (boost_dap_128_prod_comparison)<< std::endl;
-
-        prod_64_128_file << "boost_test_64_128_prod"<< std::endl;
-
-        prod_64_128_file << (boost_test_64_128_prod)<< std::endl;
-
-        prod_64_128_file << "difference"<< std::endl;
-
-        prod_64_128_file << (boost_dap_128_prod_comparison-boost_test_64_128_prod)<< std::endl;
-
-}
-
-
-        if(boost_test_128_128_prod!=boost_dap_128_128_prod_comparison){
-        
-        prod_128_128_file <<  " i is "<< std::endl;
-
-        prod_128_128_file << (i)<< std::endl;
-        
-        prod_128_128_file <<  " j is "<< std::endl;
-
-        prod_128_128_file << (j)<< std::endl;
-
-        prod_128_128_file <<  " boost_test_128_128_one is "<< std::endl;
-
-        prod_128_128_file << (boost_test_128_128_one)<< std::endl;
-
-        prod_128_128_file <<  " boost_test_128_128_two is "<< std::endl;
-
-        prod_128_128_file << (boost_test_128_128_two)<< std::endl;
-
-        prod_128_128_file << "boost_dap_128_128_prod_comparison"<< std::endl;
-
-        prod_128_128_file << (boost_dap_128_128_prod_comparison)<< std::endl;
-
-        prod_128_128_file << "dap_test_128_128_prod_prod.lo"<< std::endl;
-
-        prod_128_128_file << (dap_test_128_128_prod_prod.lo)<< std::endl;
-
-        prod_128_128_file << "dap_test_128_128_prod_prod.hi"<< std::endl;
-
-        prod_128_128_file << (dap_test_128_128_prod_prod.hi)<< std::endl;
-
-
-        prod_128_128_file << "boost_test_128_128_prod"<< std::endl;
-
-        prod_128_128_file << (boost_test_128_128_prod)<< std::endl;}
-
-
-  
-if (density_index<=127){
-  if(boost_dap_comparison_shift_left_128!=boost_test_shift_left_128){
-        shift_left_128_file <<  " density_index is "<< std::endl;
-
-        shift_left_128_file << (density_index)<< std::endl;
-
-        shift_left_128_file <<  " dap_test_128_one is "<< std::endl;
-
-        shift_left_128_file << (dap_test_128_one.lo)<< std::endl;
-        shift_left_128_file << (dap_test_128_one.hi)<< std::endl;
-        
-        shift_left_128_file <<  " dap_test_128_shift is "<< std::endl;
-
-        shift_left_128_file << (dap_test_128_shift.lo)<< std::endl;
-        shift_left_128_file << (dap_test_128_shift.hi)<< std::endl;
-
-        shift_left_128_file <<  " boost_test_shift_left_128 .lo is  "<< std::endl;
-        shift_left_128_file << boost_test_shift_left_128_remainder_limb<< std::endl;
-
-        shift_left_128_file <<  " boost_test_shift_left_128 .hi is  "<< std::endl;
-        shift_left_128_file << boost_test_shift_left_128_quotient_limb<< std::endl;
-
-
-        }
-        }
-
-
- if (density_index<=255){
- if(boost_dap_comparison_shift_left_256!=boost_test_shift_left_256){
-
-
-        shift_left_256_file <<  " density_index is "<< std::endl;
-
-        shift_left_256_file << (density_index)<< std::endl;
-
-        shift_left_256_file <<  " dap_test_256_one is "<< std::endl;
-
-        shift_left_256_file << (dap_test_256_one.lo.lo)<< std::endl;
-        shift_left_256_file << (dap_test_256_one.lo.hi)<< std::endl;
-        shift_left_256_file << (dap_test_256_one.hi.lo)<< std::endl;
-        shift_left_256_file << (dap_test_256_one.hi.hi)<< std::endl;
-   
-        
-        shift_left_256_file <<  " dap_test_256_shift is "<< std::endl;
-
-        shift_left_256_file << (dap_test_256_shift.lo.lo)<< std::endl;
-        shift_left_256_file << (dap_test_256_shift.lo.hi)<< std::endl;
-        shift_left_256_file << (dap_test_256_shift.hi.lo)<< std::endl;
-        shift_left_256_file << (dap_test_256_shift.hi.hi)<< std::endl;}
-    }
-    } 
-        
-    overflow_flag=0;
-
-    }
-    
-    sum_256_256_file.close();
-
-   if(error_counter_sum==0){
-
-    std::cout<< "SUM_256_256 returns identical results to boost:: 256 bit addition"<< std::endl;}
-
-    prod_64_128_file.close();
-
-   if(error_counter_sub_128==0){
-
-    std::cout<< "SUB_128_128 returns identical results to boost:: 128 bit subtraction"<< std::endl;}
-
-    sub_128_128_file.close();
-
-   if(error_counter_sub_256==0){
-
-    std::cout<< "SUB_256_256 returns identical results to boost:: 256 bit subtraction"<< std::endl;}
-
-    sub_256_256_file.close();
-
-
-   if(error_counter_prod==0){
-
-   std::cout<< "PROD_64_128 returns identical results to boost:: multiplication"<< std::endl;}
-
-   prod_128_128_file.close();
-
-   if(error_counter_prod_128_128==0){
-
-   std::cout<< "PROD_128_128 returns identical results to boost:: 128 bit multiplication"<< std::endl;}
-
-   if(error_counter_prod_128_256==0){
-
-   std::cout<< "PROD_128_256 returns identical results to boost:: 128 bit multiplication"<< std::endl;}
-
-   if(error_counter_prod_256_256==0){
-
-   std::cout<< "PROD_256_256 returns identical results to boost:: 256 bit multiplication"<< std::endl;}
-
-    if(error_counter_prod_256_512==0){
-
-   std::cout<< "PROD_256_512 returns identical results to boost:: 256 bit multiplication"<< std::endl;}
-
-
-   
-   if(error_counter_shift_left_128==0){
-
-    std::cout<< "SHIFT_LEFT_128 returns identical results to boost:: 128 bit <<"<< std::endl;}
-   
-   
-   if(error_counter_shift_left_256==0){
-
-    std::cout<< "SHIFT_LEFT_256 returns identical results to boost:: 256 bit <<"<< std::endl;}
-
-if (division_enabled==1){
-
-   if(error_counter_quot_128==0){
-
-    std::cout<< "QUOT_128 returns identical results to boost:: 128 bit division"<< std::endl;}
-   
-}
-   return 0;
-}
-
-
-- 
GitLab


From f1b17109f7034db6c2be02eea1f1bd24387369f7 Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Wed, 1 Nov 2023 18:10:43 +0700
Subject: [PATCH 19/21] [*] Added target include directories for fix build in
 Wondows.

---
 examples/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 6bf0b8f2a..51460f066 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -5,6 +5,7 @@ set(CMAKE_C_STANDARD 11)
 
 add_executable(${PROJECT_NAME} rng_example.c)
 
+target_include_directories(${PROJECT_NAME} INTERFACE ../crypto/src/rand/)
 #target_include_directories(rng_example INTERFACE
 #        ../3rdparty
 #        ../crypto/include
-- 
GitLab


From cfda11f93dd29ee8d1f598f1bad80400cd3a7afd Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Wed, 1 Nov 2023 19:52:21 +0700
Subject: [PATCH 20/21] Fixed build for Windows.

---
 CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e27dc3882..89a89bd9f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -140,6 +140,6 @@ elseif(ANDROID)
     include_directories(3rdparty/)
 endif()
 
-if (NOT CELLFRAME_MODULES)
-    add_subdirectory(examples)
+if (LINUX)
+    add_subdirectory(examples) #We are putting together an example for Linux only.
 endif()
-- 
GitLab


From f85f9c9245ae2337c72ce798e6b8a1c09df6ff4f Mon Sep 17 00:00:00 2001
From: "alexey.stratulat" <alexey.stratulat@demlabs.net>
Date: Tue, 7 Nov 2023 22:22:07 +0700
Subject: [PATCH 21/21] [-] Disable test for armv7l platform.

---
 cmake/OS_Detection.cmake | 18 ++++++++++++++++++
 core/test/CMakeLists.txt |  4 ++++
 2 files changed, 22 insertions(+)

diff --git a/cmake/OS_Detection.cmake b/cmake/OS_Detection.cmake
index ce71fbfdf..32b495aa5 100644
--- a/cmake/OS_Detection.cmake
+++ b/cmake/OS_Detection.cmake
@@ -229,3 +229,21 @@ if(WIN32)
     include_directories(3rdparty/wepoll/)
     #include_directories(libdap-chain-net-srv-vpn/)
 endif()
+
+# Platform
+if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
+    set(PLATFORM_X86_64 ON)
+    message("[*] Platform x86_64")
+elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "armv7")
+    set(PLATFORM_ARM ON)
+    set(VERSION "7")
+    message("[*] Platform armv7")
+elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "armv7l")
+    set(PLATFORM_ARM ON)
+    set(VERSION "7l")
+    message("[*] Platform armv7l")
+elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "armv8")
+    set(PLATFORM_ARM ON)
+    set(VERSION "8")
+    message("[*] Platform armv8")
+endif ()
diff --git a/core/test/CMakeLists.txt b/core/test/CMakeLists.txt
index 0d3ed2528..35eb943ec 100755
--- a/core/test/CMakeLists.txt
+++ b/core/test/CMakeLists.txt
@@ -58,10 +58,14 @@ add_test(
     COMMAND core_test
 )
 
+if (NOT PLATFORM_ARM AND VERSION MATCHES "7l")
 add_test(
     NAME rpm-test
     COMMAND rpmalloc_test
 )
+else()
+    message("[-] Disable rpm test for armv7l platform")
+endif ()
 
 if(UNIX)
     target_include_directories(${PROJECT_NAME} PRIVATE unix)
-- 
GitLab