From 1dfa57af675c234b8425d2e653af686f0138e65e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 17 Nov 2021 22:03:38 +0100 Subject: -dce --- src/testing/testing_api_trait_account_priv.c | 58 ------------------------ src/testing/testing_api_trait_account_pub.c | 58 ------------------------ src/testing/testing_api_trait_code.c | 59 ------------------------- src/testing/testing_api_trait_eks.c | 58 ------------------------ src/testing/testing_api_trait_hash.c | 57 ------------------------ src/testing/testing_api_trait_payment_secret.c | 59 ------------------------- src/testing/testing_api_trait_salt.c | 60 ------------------------- src/testing/testing_api_trait_truth_key.c | 58 ------------------------ src/testing/testing_api_trait_truth_uuid.c | 61 -------------------------- src/testing/testing_trait_challenge.c | 57 ------------------------ src/testing/testing_trait_core_secret.c | 59 ------------------------- src/testing/testing_trait_policy.c | 58 ------------------------ src/testing/testing_trait_truth.c | 58 ------------------------ 13 files changed, 760 deletions(-) delete mode 100644 src/testing/testing_api_trait_account_priv.c delete mode 100644 src/testing/testing_api_trait_account_pub.c delete mode 100644 src/testing/testing_api_trait_code.c delete mode 100644 src/testing/testing_api_trait_eks.c delete mode 100644 src/testing/testing_api_trait_hash.c delete mode 100644 src/testing/testing_api_trait_payment_secret.c delete mode 100644 src/testing/testing_api_trait_salt.c delete mode 100644 src/testing/testing_api_trait_truth_key.c delete mode 100644 src/testing/testing_api_trait_truth_uuid.c delete mode 100644 src/testing/testing_trait_challenge.c delete mode 100644 src/testing/testing_trait_core_secret.c delete mode 100644 src/testing/testing_trait_policy.c delete mode 100644 src/testing/testing_trait_truth.c (limited to 'src') diff --git a/src/testing/testing_api_trait_account_priv.c b/src/testing/testing_api_trait_account_priv.c deleted file mode 100644 index f6dc664..0000000 --- a/src/testing/testing_api_trait_account_priv.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - This file is part of Anastasis - Copyright (C) 2019 Anastasis SARL - - Anastasis 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. - - Anastasis 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 Privlic License for more details. - - You should have received a copy of the GNU General Privlic - License along with Anastasis; see the file COPYING. If not, see - -*/ -/** - * @file testing/testing_api_trait_account_priv.c - * @brief traits to offer a account_priv - * @author Christian Grothoff - */ -#include "platform.h" -#include "anastasis_testing_lib.h" - -#define ANASTASIS_TESTING_TRAIT_ACCOUNT_PRIV "anastasis-account_priv" - - -int -ANASTASIS_TESTING_get_trait_account_priv ( - const struct TALER_TESTING_Command *cmd, - unsigned int index, - const struct ANASTASIS_CRYPTO_AccountPrivateKeyP **priv) -{ - return cmd->traits (cmd->cls, - (const void **) priv, - ANASTASIS_TESTING_TRAIT_ACCOUNT_PRIV, - index); -} - - -struct TALER_TESTING_Trait -ANASTASIS_TESTING_make_trait_account_priv ( - unsigned int index, - const struct ANASTASIS_CRYPTO_AccountPrivateKeyP *priv) -{ - struct TALER_TESTING_Trait ret = { - .index = index, - .trait_name = ANASTASIS_TESTING_TRAIT_ACCOUNT_PRIV, - .ptr = (const void *) priv - }; - - return ret; -} - - -/* end of testing_api_trait_account_priv.c */ diff --git a/src/testing/testing_api_trait_account_pub.c b/src/testing/testing_api_trait_account_pub.c deleted file mode 100644 index 7f28f45..0000000 --- a/src/testing/testing_api_trait_account_pub.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - This file is part of Anastasis - Copyright (C) 2019 Anastasis SARL - - Anastasis 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. - - Anastasis 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 Anastasis; see the file COPYING. If not, see - -*/ -/** - * @file testing/testing_api_trait_account_pub.c - * @brief traits to offer a account_pub - * @author Christian Grothoff - */ -#include "platform.h" -#include "anastasis_testing_lib.h" - -#define ANASTASIS_TESTING_TRAIT_ACCOUNT_PUB "anastasis-account_pub" - - -int -ANASTASIS_TESTING_get_trait_account_pub ( - const struct TALER_TESTING_Command *cmd, - unsigned int index, - const struct ANASTASIS_CRYPTO_AccountPublicKeyP **pub) -{ - return cmd->traits (cmd->cls, - (const void **) pub, - ANASTASIS_TESTING_TRAIT_ACCOUNT_PUB, - index); -} - - -struct TALER_TESTING_Trait -ANASTASIS_TESTING_make_trait_account_pub ( - unsigned int index, - const struct ANASTASIS_CRYPTO_AccountPublicKeyP *h) -{ - struct TALER_TESTING_Trait ret = { - .index = index, - .trait_name = ANASTASIS_TESTING_TRAIT_ACCOUNT_PUB, - .ptr = (const void *) h - }; - - return ret; -} - - -/* end of testing_api_trait_account_pub.c */ diff --git a/src/testing/testing_api_trait_code.c b/src/testing/testing_api_trait_code.c deleted file mode 100644 index e179fd5..0000000 --- a/src/testing/testing_api_trait_code.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - This file is part of Anastasis - Copyright (C) 2019 Anastasis SARL - - Anastasis 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. - - Anastasis 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 Anastasis; see the file COPYING. If not, see - -*/ -/** - * @file testing/testing_api_trait_code.c - * @brief traits to offers a code for a challenge - * @author Dominik Meister - * @author Christian Grothoff - */ -#include "platform.h" -#include "anastasis_testing_lib.h" - -#define ANASTASIS_TESTING_TRAIT_CODE "anastasis-code" - - -int -ANASTASIS_TESTING_get_trait_code ( - const struct TALER_TESTING_Command *cmd, - unsigned int index, - const char **code) -{ - return cmd->traits (cmd->cls, - (const void **) code, - ANASTASIS_TESTING_TRAIT_CODE, - index); -} - - -struct TALER_TESTING_Trait -ANASTASIS_TESTING_make_trait_code ( - unsigned int index, - const char *code) -{ - struct TALER_TESTING_Trait ret = { - .index = index, - .trait_name = ANASTASIS_TESTING_TRAIT_CODE, - .ptr = (const void *) code - }; - - return ret; -} - - -/* end of testing_api_trait_code.c */ diff --git a/src/testing/testing_api_trait_eks.c b/src/testing/testing_api_trait_eks.c deleted file mode 100644 index 638c4ae..0000000 --- a/src/testing/testing_api_trait_eks.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - This file is part of Anastasis - Copyright (C) 2021 Anastasis SARL - - Anastasis 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. - - Anastasis 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 Anastasis; see the file COPYING. If not, see - -*/ -/** - * @file testing/testing_api_trait_eks.c - * @brief traits to offer a payment identifier - * @author Dennis Neufeld - */ -#include "platform.h" -#include "anastasis_testing_lib.h" - -#define ANASTASIS_TESTING_TRAIT_EKS \ - "anastasis-eks" - - -int -ANASTASIS_TESTING_get_trait_eks ( - const struct TALER_TESTING_Command *cmd, - unsigned int index, - const struct ANASTASIS_CRYPTO_EncryptedKeyShareP **eks) -{ - return cmd->traits (cmd->cls, - (const void **) eks, - ANASTASIS_TESTING_TRAIT_EKS, - index); -} - - -struct TALER_TESTING_Trait -ANASTASIS_TESTING_make_trait_eks ( - unsigned int index, - const struct ANASTASIS_CRYPTO_EncryptedKeyShareP *eks) -{ - struct TALER_TESTING_Trait ret = { - .index = index, - .trait_name = ANASTASIS_TESTING_TRAIT_EKS, - .ptr = (const void *) eks - }; - return ret; -} - - -/* end of testing_api_trait_eks.c */ diff --git a/src/testing/testing_api_trait_hash.c b/src/testing/testing_api_trait_hash.c deleted file mode 100644 index 4e7ba01..0000000 --- a/src/testing/testing_api_trait_hash.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - This file is part of Anastasis - Copyright (C) 2019 Anastasis SARL - - Anastasis 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. - - Anastasis 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 Anastasis; see the file COPYING. If not, see - -*/ -/** - * @file anastasis/src/testing/testing_api_trait_hash.c - * @brief traits to offer a hash - * @author Christian Grothoff - */ -#include "platform.h" -#include "anastasis_testing_lib.h" - -#define ANASTASIS_TESTING_TRAIT_HASH "anastasis-hash" - - -int -ANASTASIS_TESTING_get_trait_hash ( - const struct TALER_TESTING_Command *cmd, - unsigned int index, - const struct GNUNET_HashCode **h) -{ - return cmd->traits (cmd->cls, - (const void **) h, - ANASTASIS_TESTING_TRAIT_HASH, - index); -} - - -struct TALER_TESTING_Trait -ANASTASIS_TESTING_make_trait_hash ( - unsigned int index, - const struct GNUNET_HashCode *h) -{ - struct TALER_TESTING_Trait ret = { - .index = index, - .trait_name = ANASTASIS_TESTING_TRAIT_HASH, - .ptr = (const void *) h - }; - return ret; -} - - -/* end of testing_api_trait_hash.c */ diff --git a/src/testing/testing_api_trait_payment_secret.c b/src/testing/testing_api_trait_payment_secret.c deleted file mode 100644 index 0f764d9..0000000 --- a/src/testing/testing_api_trait_payment_secret.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - This file is part of Anastasis - Copyright (C) 2019 Anastasis SARL - - Anastasis 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. - - Anastasis 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 Anastasis; see the file COPYING. If not, see - -*/ -/** - * @file testing/testing_api_trait_payment_secret.c - * @brief traits to offer a payment identifier - * @author Dennis Neufeld - */ -#include "platform.h" -#include "anastasis_testing_lib.h" - -#define ANASTASIS_TESTING_TRAIT_PAYMENT_SECRET \ - "anastasis-payment_secret" - - -int -ANASTASIS_TESTING_get_trait_payment_secret ( - const struct TALER_TESTING_Command *cmd, - unsigned int index, - const struct ANASTASIS_PaymentSecretP **payment_secret) -{ - return cmd->traits (cmd->cls, - (const void **) payment_secret, - ANASTASIS_TESTING_TRAIT_PAYMENT_SECRET, - index); -} - - -struct TALER_TESTING_Trait -ANASTASIS_TESTING_make_trait_payment_secret ( - unsigned int index, - const struct ANASTASIS_PaymentSecretP *h) -{ - struct TALER_TESTING_Trait ret = { - .index = index, - .trait_name = ANASTASIS_TESTING_TRAIT_PAYMENT_SECRET, - .ptr = (const void *) h - }; - - return ret; -} - - -/* end of testing_api_trait_payment_secret.c */ diff --git a/src/testing/testing_api_trait_salt.c b/src/testing/testing_api_trait_salt.c deleted file mode 100644 index 356ba57..0000000 --- a/src/testing/testing_api_trait_salt.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - This file is part of Anastasis - Copyright (C) 2020 Anastasis SARL - - Anastasis 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. - - Anastasis 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 Anastasis; see the file COPYING. If not, see - -*/ -/** - * @file testing/testing_api_trait_salt.c - * @brief traits to offer a hash - * @author Christian Grothoff - * @author Dominik Meister - * @author Dennis Neufeld - */ -#include "platform.h" -#include "anastasis_testing_lib.h" - -#define ANASTASIS_TESTING_TRAIT_SALT "anastasis-provider-salt" - - -int -ANASTASIS_TESTING_get_trait_salt ( - const struct TALER_TESTING_Command *cmd, - unsigned int index, - const struct ANASTASIS_CRYPTO_ProviderSaltP **s) -{ - return cmd->traits (cmd->cls, - (const void **) s, - ANASTASIS_TESTING_TRAIT_SALT, - index); -} - - -struct TALER_TESTING_Trait -ANASTASIS_TESTING_make_trait_salt ( - unsigned int index, - const struct ANASTASIS_CRYPTO_ProviderSaltP *s) -{ - struct TALER_TESTING_Trait ret = { - .index = index, - .trait_name = ANASTASIS_TESTING_TRAIT_SALT, - .ptr = (const void *) s - }; - - return ret; -} - - -/* end of testing_api_trait_salt.c */ diff --git a/src/testing/testing_api_trait_truth_key.c b/src/testing/testing_api_trait_truth_key.c deleted file mode 100644 index 200643e..0000000 --- a/src/testing/testing_api_trait_truth_key.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - This file is part of Anastasis - Copyright (C) 2019, 2021 Anastasis SARL - - Anastasis 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. - - Anastasis 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 Anastasis; see the file COPYING. If not, see - -*/ -/** - * @file testing/testing_api_trait_truth_key.c - * @brief traits to offer a payment identifier - * @author Dennis Neufeld - */ -#include "platform.h" -#include "anastasis_testing_lib.h" - -#define ANASTASIS_TESTING_TRAIT_TRUTH_KEY \ - "anastasis-truth_key" - - -int -ANASTASIS_TESTING_get_trait_truth_key - (const struct TALER_TESTING_Command *cmd, - unsigned int index, - const struct ANASTASIS_CRYPTO_TruthKeyP **truth_key) -{ - return cmd->traits (cmd->cls, - (const void **) truth_key, - ANASTASIS_TESTING_TRAIT_TRUTH_KEY, - index); -} - - -struct TALER_TESTING_Trait -ANASTASIS_TESTING_make_trait_truth_key - (unsigned int index, - const struct ANASTASIS_CRYPTO_TruthKeyP *h) -{ - struct TALER_TESTING_Trait ret = { - .index = index, - .trait_name = ANASTASIS_TESTING_TRAIT_TRUTH_KEY, - .ptr = (const void *) h - }; - return ret; -} - - -/* end of testing_api_trait_truth_key.c */ diff --git a/src/testing/testing_api_trait_truth_uuid.c b/src/testing/testing_api_trait_truth_uuid.c deleted file mode 100644 index 057b589..0000000 --- a/src/testing/testing_api_trait_truth_uuid.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - This file is part of Anastasis - Copyright (C) 2020 Anastasis SARL - - Anastasis 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. - - Anastasis 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 Anastasis; see the file COPYING. If not, see - -*/ -/** - * @file testing/testing_api_trait_truth_uuid.c - * @brief traits to offer a UUID for some truth - * @author Christian Grothoff - * @author Dominik Meister - * @author Dennis Neufeld - */ -#include "platform.h" -#include "anastasis_testing_lib.h" - - -#define ANASTASIS_TESTING_TRAIT_TRUTH_UUID "anastasis-truth-uuid" - - -int -ANASTASIS_TESTING_get_trait_truth_uuid ( - const struct TALER_TESTING_Command *cmd, - unsigned int index, - const struct ANASTASIS_CRYPTO_TruthUUIDP **tpk) -{ - return cmd->traits (cmd->cls, - (const void **) tpk, - ANASTASIS_TESTING_TRAIT_TRUTH_UUID, - index); -} - - -struct TALER_TESTING_Trait -ANASTASIS_TESTING_make_trait_truth_uuid ( - unsigned int index, - const struct ANASTASIS_CRYPTO_TruthUUIDP *tpk) -{ - struct TALER_TESTING_Trait ret = { - .index = index, - .trait_name = ANASTASIS_TESTING_TRAIT_TRUTH_UUID, - .ptr = (const void *) tpk - }; - - return ret; -} - - -/* end of testing_api_trait_truth_uuid.c */ diff --git a/src/testing/testing_trait_challenge.c b/src/testing/testing_trait_challenge.c deleted file mode 100644 index 68c4492..0000000 --- a/src/testing/testing_trait_challenge.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - This file is part of Anastasis - Copyright (C) 2020 Anastasis SARL - - Anastasis 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. - - Anastasis 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 Anastasis; see the file COPYING. If not, see - -*/ -/** - * @file testing/testing_trait_challenge.c - * @brief traits to offer a challenge - * @author Christian Grothoff - * @author Dominik Meister - * @author Dennis Neufeld - */ -#include "platform.h" -#include "anastasis_testing_lib.h" - -#define ANASTASIS_TESTING_TRAIT_CHALLENGE "anastasis-challenge" - - -int -ANASTASIS_TESTING_get_trait_challenge (const struct TALER_TESTING_Command *cmd, - unsigned int index, - const struct ANASTASIS_Challenge **c) -{ - return cmd->traits (cmd->cls, - (const void **) c, - ANASTASIS_TESTING_TRAIT_CHALLENGE, - index); -} - - -struct TALER_TESTING_Trait -ANASTASIS_TESTING_make_trait_challenge (unsigned int index, - const struct ANASTASIS_Challenge *c) -{ - struct TALER_TESTING_Trait ret = { - .index = index, - .trait_name = ANASTASIS_TESTING_TRAIT_CHALLENGE, - .ptr = (const void *) c - }; - return ret; -} - - -/* end of testing_trait_challenge.c */ diff --git a/src/testing/testing_trait_core_secret.c b/src/testing/testing_trait_core_secret.c deleted file mode 100644 index ed61b17..0000000 --- a/src/testing/testing_trait_core_secret.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - This file is part of Anastasis - Copyright (C) 2020 Anastasis SARL - - Anastasis 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. - - Anastasis 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 Anastasis; see the file COPYING. If not, see - -*/ -/** - * @file testing/testing_trait_core_secret.c - * @brief traits to offer the core secret - * @author Christian Grothoff - * @author Dominik Meister - * @author Dennis Neufeld - */ -#include "platform.h" -#include "anastasis_testing_lib.h" - -#define ANASTASIS_TESTING_TRAIT_CORE_SECRET "anastasis-core-secret" - - -int -ANASTASIS_TESTING_get_trait_core_secret (const struct - TALER_TESTING_Command *cmd, - unsigned int index, - const void **s) -{ - return cmd->traits (cmd->cls, - s, - ANASTASIS_TESTING_TRAIT_CORE_SECRET, - index); -} - - -struct TALER_TESTING_Trait -ANASTASIS_TESTING_make_trait_core_secret (unsigned int index, - const void *s) -{ - struct TALER_TESTING_Trait ret = { - .index = index, - .trait_name = ANASTASIS_TESTING_TRAIT_CORE_SECRET, - .ptr = s - }; - - return ret; -} - - -/* end of testing_trait_core_secret.c */ diff --git a/src/testing/testing_trait_policy.c b/src/testing/testing_trait_policy.c deleted file mode 100644 index 193773f..0000000 --- a/src/testing/testing_trait_policy.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - This file is part of Anastasis - Copyright (C) 2020 Anastasis SARL - - Anastasis 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. - - Anastasis 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 Anastasis; see the file COPYING. If not, see - -*/ -/** - * @file testing/testing_trait_policy.c - * @brief traits to offer a policy - * @author Christian Grothoff - * @author Dominik Meister - * @author Dennis Neufeld - */ -#include "platform.h" -#include "anastasis_testing_lib.h" - -#define ANASTASIS_TESTING_TRAIT_POLICY "anastasis-policy" - - -int -ANASTASIS_TESTING_get_trait_policy (const struct TALER_TESTING_Command *cmd, - unsigned int index, - const struct ANASTASIS_Policy **p) -{ - return cmd->traits (cmd->cls, - (const void **) p, - ANASTASIS_TESTING_TRAIT_POLICY, - index); -} - - -struct TALER_TESTING_Trait -ANASTASIS_TESTING_make_trait_policy (unsigned int index, - const struct ANASTASIS_Policy *p) -{ - struct TALER_TESTING_Trait ret = { - .index = index, - .trait_name = ANASTASIS_TESTING_TRAIT_POLICY, - .ptr = (const void *) p - }; - - return ret; -} - - -/* end of testing_trait_policy.c */ diff --git a/src/testing/testing_trait_truth.c b/src/testing/testing_trait_truth.c deleted file mode 100644 index 8e3bceb..0000000 --- a/src/testing/testing_trait_truth.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - This file is part of Anastasis - Copyright (C) 2020 Anastasis SARL - - Anastasis 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. - - Anastasis 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 Anastasis; see the file COPYING. If not, see - -*/ -/** - * @file testing/testing_trait_truth.c - * @brief traits to offer a truth - * @author Christian Grothoff - * @author Dominik Meister - * @author Dennis Neufeld - */ -#include "platform.h" -#include "anastasis_testing_lib.h" - -#define ANASTASIS_TESTING_TRAIT_TRUTH "anastasis-truth" - - -int -ANASTASIS_TESTING_get_trait_truth (const struct TALER_TESTING_Command *cmd, - unsigned int index, - const struct ANASTASIS_Truth **t) -{ - return cmd->traits (cmd->cls, - (const void **) t, - ANASTASIS_TESTING_TRAIT_TRUTH, - index); -} - - -struct TALER_TESTING_Trait -ANASTASIS_TESTING_make_trait_truth (unsigned int index, - const struct ANASTASIS_Truth *t) -{ - struct TALER_TESTING_Trait ret = { - .index = index, - .trait_name = ANASTASIS_TESTING_TRAIT_TRUTH, - .ptr = (const void *) t - }; - - return ret; -} - - -/* end of testing_trait_truth.c */ -- cgit v1.2.3