From 0a0569bd53bf93fda0971c07d9044042ee55cbc0 Mon Sep 17 00:00:00 2001 From: heck Date: Sun, 11 Jul 2021 01:39:15 +0200 Subject: [PATCH] Test: add test_sync_init - sync_initialize() --- ...{test_adapter_cxx.cc => test_sync_init.cc} | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) rename test/{test_adapter_cxx.cc => test_sync_init.cc} (79%) diff --git a/test/test_adapter_cxx.cc b/test/test_sync_init.cc similarity index 79% rename from test/test_adapter_cxx.cc rename to test/test_sync_init.cc index 9dc083b..9d91374 100644 --- a/test/test_adapter_cxx.cc +++ b/test/test_sync_init.cc @@ -25,19 +25,6 @@ PEP_STATUS notifyHandshake(pEp_identity *me, pEp_identity *partner, ::sync_hands return PEP_STATUS_OK; } -class JNISync { -public: - void onSyncStartup() - { - TESTLOG("called"); - } - - void onSyncShutdown() - { - TESTLOG("called"); - } -} o; - int main(int argc, char **argv) { pEp::Test::setup(argc, argv); @@ -57,12 +44,8 @@ int main(int argc, char **argv) TESTLOG(i); TESTLOG("SYNC START"); TESTLOG("starting the adapter including sync"); - Adapter::startup( - messageToSend, - notifyHandshake, - &o, - &JNISync::onSyncStartup, - &JNISync::onSyncShutdown); + + Adapter::sync_initialize(Adapter::SyncModes::Off, messageToSend, notifyHandshake, false); TESTLOG("SYNC STOP"); Utils::sleep_millis(500); Adapter::shutdown();