ObjMatrix  Check-in [86b43015f0]

Overview
Comment:tests: Print better error messages
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 86b43015f07361d21316dfffe78509ba117c05c598f2ccdfa1c0cec3af140ad5
User & Date: js on 2020-10-03 15:32:41
Other Links: manifest | tags
Context
2020-10-03
16:21
MTXClient: Add support for logging out check-in: c29845b7b8 user: js tags: trunk
15:32
tests: Print better error messages check-in: 86b43015f0 user: js tags: trunk
15:30
ObjMatrix.oc: Remove ObjSQLite3 dependency check-in: 91648879e2 user: js tags: trunk
Changes

Modified src/ObjMatrix.h from [82b616f812] to [b15ca8b4fe].

18
19
20
21
22
23
24


18
19
20
21
22
23
24
25
26







+
+
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#import "MTXClient.h"
#import "MTXRequest.h"

#import "MTXLoginFailedException.h"

Modified tests/Makefile from [78699fd8e6] to [14f9b97f64].

36
37
38
39
40
41
42
43

44
45
36
37
38
39
40
41
42

43
44
45







-
+


	rm -f libobjmatrix.so.${OBJMATRIX_LIB_MAJOR}; \
	rm -f libobjmatrix.so.${OBJMATRIX_LIB_MAJOR_MINOR} objmatrix.dll; \
	rm -f libobjmatrix.${OBJMATRIX_LIB_MAJOR}.dylib; \
	exit $$EXIT

${PROG_NOINST}: ${LIBOBJMATRIX_DEP}

CPPFLAGS += -I../src
CPPFLAGS += -I../src -I../src/exceptions
LIBS := -L../src -lobjmatrix ${LIBS}
LD = ${OBJC}

Modified tests/tests.m from [b5a188a928] to [30cdad59c3].

18
19
20
21
22
23
24
25

26
27
28
29
30
31
32
18
19
20
21
22
23
24

25
26
27
28
29
30
31
32







-
+







 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#import <ObjFW/ObjFW.h>

#import "MTXClient.h"
#import "ObjMatrix.h"

@interface Tests: OFObject <OFApplicationDelegate>
@end

OF_APPLICATION_DELEGATE(Tests)

@implementation Tests
46
47
48
49
50
51
52




53
54
55
56
57
58
59
60
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64







+
+
+
+








	[MTXClient logInWithUser: environment[@"OBJMATRIX_USER"]
			password: environment[@"OBJMATRIX_PASS"]
		      homeserver: homeserver
			   block: ^ (MTXClient *client, id exception) {
		if (exception != nil) {
			[of_stdout writeFormat: @"Error logging in: %@\n",
						exception];
			if ([exception isKindOfClass:
			    MTXLoginFailedException.class])
				[of_stdout writeFormat: @"Response: %@\n",
							[exception response]];
			[OFApplication terminateWithStatus: 1];
		}

		[of_stdout writeFormat: @"Logged in client: %@\n", client];
		[OFApplication terminate];
	}];
}
@end