testing_api_traits.c (1687B)
1 /* 2 This file is part of TALER 3 Copyright (C) 2024 Taler Systems SA 4 5 TALER is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as 7 published by the Free Software Foundation; either version 3, or 8 (at your option) any later version. 9 10 TALER is distributed in the hope that it will be useful, but 11 WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public 16 License along with TALER; see the file COPYING. If not, see 17 <http://www.gnu.org/licenses/> 18 */ 19 /** 20 * @file testing/testing_api_traits.c 21 * @brief loop for trait resolution 22 * @author Christian Grothoff 23 * @author Marcello Stanisci 24 */ 25 #include <donau_config.h> 26 #include "donau_testing_lib.h" 27 28 29 DONAU_TESTING_SIMPLE_TRAITS (TALER_TESTING_MAKE_IMPL_SIMPLE_TRAIT) 30 31 DONAU_TESTING_INDEXED_TRAITS (TALER_TESTING_MAKE_IMPL_INDEXED_TRAIT) 32 33 const char * 34 TALER_TESTING_get_donau_url (struct TALER_TESTING_Interpreter *is) 35 { 36 const char *donau_url; 37 const struct TALER_TESTING_Command *donau_cmd; 38 39 donau_cmd 40 = TALER_TESTING_interpreter_get_command (is, 41 "donau"); 42 if (NULL == donau_cmd) 43 { 44 GNUNET_break (0); 45 TALER_TESTING_interpreter_fail (is); 46 return NULL; 47 } 48 if (GNUNET_OK != 49 TALER_TESTING_get_trait_donau_url (donau_cmd, 50 &donau_url)) 51 { 52 GNUNET_break (0); 53 TALER_TESTING_interpreter_fail (is); 54 return NULL; 55 } 56 return donau_url; 57 } 58 59 /* end of testing_api_traits.c */