donau

Donation authority for GNU Taler (experimental)
Log | Files | Refs | Submodules | README | LICENSE

commit 304b94d39c3a0251cd8f5d53ad6275660146e7f4
parent 5325914fb35d5d1ceb18efaff56d950ec0d2baa5
Author: Casaburi Johannes <johannes.casaburi@students.bfh.ch>
Date:   Fri, 12 Jan 2024 17:24:02 +0100

Merge remote-tracking branch 'refs/remotes/origin/master'

Diffstat:
Msrc/include/donau_testing_lib.h | 12+++---------
Msrc/testing/Makefile.am | 4+++-
Msrc/testing/test_api_cmd_get_donau.c | 2+-
Asrc/testing/testing_api_traits.c | 34++++++++++++++++++++++++++++++++++
4 files changed, 41 insertions(+), 11 deletions(-)

diff --git a/src/include/donau_testing_lib.h b/src/include/donau_testing_lib.h @@ -22,17 +22,14 @@ * @brief API for writing an interpreter to test Taler components * @author Christian Grothoff <christian@grothoff.org> * @author Marcello Stanisci + * @author Lukas Matyja * */ #ifndef DONAU_TESTING_LIB_H #define DONAU_TESTING_LIB_H -#include "taler/taler_util.h" -#include <microhttpd.h> -#include <gnunet/gnunet_json_lib.h> -#include "taler/taler_json_lib.h" +#include <taler/taler_testing_lib.h> #include "donau_service.h" -#include "taler/taler_testing_lib.h" @@ -82,8 +79,7 @@ DONAU_TESTING_main (char *const *argv, */ #define DONAU_TESTING_SIMPLE_TRAITS(op) \ op (donau_url, const char) \ - op (keys, struct TALER_EXCHANGE_Keys) \ - op (process, struct GNUNET_OS_Process *) + op (donau_keys, struct DONAU_Keys) /** @@ -91,11 +87,9 @@ DONAU_TESTING_main (char *const *argv, */ #define DONAU_TESTING_INDEXED_TRAITS(op) \ op (donation_unit_pub, const struct DONAU_DonationUnitInformation) \ - op (amounts, const struct TALER_Amount) \ op (donau_pub, const struct TALER_ExchangePublicKeyP) DONAU_TESTING_SIMPLE_TRAITS (TALER_TESTING_MAKE_DECL_SIMPLE_TRAIT) - DONAU_TESTING_INDEXED_TRAITS (TALER_TESTING_MAKE_DECL_INDEXED_TRAIT) #endif \ No newline at end of file diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am @@ -20,7 +20,8 @@ libdonautesting_la_LDFLAGS = \ -version-info 0:0:0 \ -no-undefined libdonautesting_la_SOURCES = \ - test_api_cmd_get_donau.c + test_api_cmd_get_donau.c \ + testing_api_traits.c AM_TESTS_ENVIRONMENT=export DONAU_PREFIX=$${DONAU_PREFIX:-@libdir@};export PATH=$${DONAU_PREFIX:-@prefix@}/bin:$$PATH; @@ -36,6 +37,7 @@ TESTS = \ test_donau_api_cs_SOURCES = \ test_donau_api.c + test_donau_api_cs_LDADD = \ libdonautesting.la \ $(top_builddir)/src/lib/libdonau.la \ diff --git a/src/testing/test_api_cmd_get_donau.c b/src/testing/test_api_cmd_get_donau.c @@ -25,7 +25,7 @@ #include "taler/platform.h" #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> -#include "taler/taler_testing_lib.h" +#include <taler/taler_testing_lib.h> #include "donau_testing_lib.h" #include "donau_service.h" diff --git a/src/testing/testing_api_traits.c b/src/testing/testing_api_traits.c @@ -0,0 +1,34 @@ +/* + This file is part of TALER + Copyright (C) 2024 Taler Systems SA + + TALER is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 3, or + (at your option) any later version. + + TALER is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with TALER; see the file COPYING. If not, see + <http://www.gnu.org/licenses/> +*/ +/** + * @file testing/testing_api_traits.c + * @brief loop for trait resolution + * @author Christian Grothoff + * @author Marcello Stanisci + */ +#include "taler/platform.h" +#include "donau_testing_lib.h" + + +DONAU_TESTING_SIMPLE_TRAITS (TALER_TESTING_MAKE_IMPL_SIMPLE_TRAIT) + +DONAU_TESTING_INDEXED_TRAITS (TALER_TESTING_MAKE_IMPL_INDEXED_TRAIT) + + +/* end of testing_api_traits.c */