comparison test/callback_plain/callback_plain.c @ 410:7608e34098b0

- cleanups, simplifications, some api clarification, ... - test cases consistency: * return status code depending on test results (for actual conformance tests, not stuff that is not an example or hack to check something, ..) * platform init helper added for some
author Tassilo Philipp
date Tue, 05 Oct 2021 21:53:04 +0200
parents 9269d17a8f99
children 71c884e610f0
comparison
equal deleted inserted replaced
409:15698dc0cba3 410:7608e34098b0
4 Library: test 4 Library: test
5 File: test/callback_plain/callback_plain.c 5 File: test/callback_plain/callback_plain.c
6 Description: 6 Description:
7 License: 7 License:
8 8
9 Copyright (c) 2011-2018 Daniel Adler <dadler@uni-goettingen.de>, 9 Copyright (c) 2011-2021 Daniel Adler <dadler@uni-goettingen.de>,
10 Tassilo Philipp <tphilipp@potion-studios.com> 10 Tassilo Philipp <tphilipp@potion-studios.com>
11 11
12 Permission to use, copy, modify, and distribute this software for any 12 Permission to use, copy, modify, and distribute this software for any
13 purpose with or without fee is hereby granted, provided that the above 13 purpose with or without fee is hereby granted, provided that the above
14 copyright notice and this permission notice appear in all copies. 14 copyright notice and this permission notice appear in all copies.
72 dcbFreeCallback(cb); 72 dcbFreeCallback(cb);
73 73
74 printf("successfully returned from callback\n"); 74 printf("successfully returned from callback\n");
75 printf("return value (should be 1234): %d\n", result); 75 printf("return value (should be 1234): %d\n", result);
76 76
77 printf("result: callback_plain: %s\n", (userdata == 6) && (result == 1234) ? "1" : "0"); 77 result = (userdata == 6) && (result == 1234);
78 printf("result: callback_plain: %d\n", result);
78 79
79 dcTest_deInitPlatform(); 80 dcTest_deInitPlatform();
80 81
81 return 0; 82 return !result;
82 } 83 }
83 84