ObjSQLite3  Check-in [f9e1d909b8]

Overview
Comment:Add skeleton for tests
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f9e1d909b8ea189694728bf9fc9ece339ad90a1fca753ba87e28135f7643aa92
User & Date: js on 2020-10-01 21:58:19
Other Links: manifest | tags
Context
2020-10-01
21:59
Update .fossil-settings/ignore-glob check-in: eb4ede18a3 user: js tags: trunk
21:58
Add skeleton for tests check-in: f9e1d909b8 user: js tags: trunk
21:26
SL3Connection: Add a way to prepare statements check-in: c64a1aa6fa user: js tags: trunk
Changes

Modified Makefile from [9c67618733] to [9212b7c232].

1
2
3
4
5
6
7
8
9
10
11
12


13
14
15
16
17
18
19
SUBDIRS = src
DISTCLEAN = ObjSQLite3.oc	\
	    aclocal.m4		\
	    autom4te.cache	\
	    buildsys.mk		\
	    config.h		\
	    config.log		\
	    config.status	\
	    extra.mk

include buildsys.mk
include extra.mk



install-extra:
	i=ObjSQLite3.oc; \
	packagesdir="${DESTDIR}$$(${OBJFW_CONFIG} --packages-dir)"; \
	${INSTALL_STATUS}; \
	if ${MKDIR_P} $$packagesdir && ${INSTALL} -m 644 $$i $$packagesdir/$$i; then \
		${INSTALL_OK}; \
|











>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
SUBDIRS = src tests
DISTCLEAN = ObjSQLite3.oc	\
	    aclocal.m4		\
	    autom4te.cache	\
	    buildsys.mk		\
	    config.h		\
	    config.log		\
	    config.status	\
	    extra.mk

include buildsys.mk
include extra.mk

tests: src

install-extra:
	i=ObjSQLite3.oc; \
	packagesdir="${DESTDIR}$$(${OBJFW_CONFIG} --packages-dir)"; \
	${INSTALL_STATUS}; \
	if ${MKDIR_P} $$packagesdir && ${INSTALL} -m 644 $$i $$packagesdir/$$i; then \
		${INSTALL_OK}; \

Modified configure.ac from [735b3a5ce7] to [d0a0c9cf6b].

49
50
51
52
53
54
55

56
57
58
59
60
61
62
	])
])
AC_ARG_ENABLE(static, AS_HELP_STRING([--enable-static], [build static library]))
AS_IF([test x"$enable_static" = x"yes" -o x"$enable_shared" = x"no"], [
	AC_SUBST(OBJSQLITE3_STATIC_LIB, "libobjsqlite3.a")
	AC_SUBST(EXCEPTIONS_A, "exceptions.a")
	AC_SUBST(EXCEPTIONS_EXCEPTIONS_A, "exceptions/exceptions.a")

])

AC_ARG_WITH(sqlite3, AS_HELP_STRING([--with-sqlite3=PREFIX],
	[build with SQLite3 in the specified prefix]))
AS_IF([test x"$with_sqlite3" != x"no" -a x"$with_sqlite3" != x""], [
	SQLITE3_CPPFLAGS="-I$with_sqlite3/include"
	SQLITE3_LIBS="-L$with_sqlite3/lib"







>







49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
	])
])
AC_ARG_ENABLE(static, AS_HELP_STRING([--enable-static], [build static library]))
AS_IF([test x"$enable_static" = x"yes" -o x"$enable_shared" = x"no"], [
	AC_SUBST(OBJSQLITE3_STATIC_LIB, "libobjsqlite3.a")
	AC_SUBST(EXCEPTIONS_A, "exceptions.a")
	AC_SUBST(EXCEPTIONS_EXCEPTIONS_A, "exceptions/exceptions.a")
	AC_SUBST(LIBOBJSQLITE3_DEP, "../src/libobjsqlite3.a")
])

AC_ARG_WITH(sqlite3, AS_HELP_STRING([--with-sqlite3=PREFIX],
	[build with SQLite3 in the specified prefix]))
AS_IF([test x"$with_sqlite3" != x"no" -a x"$with_sqlite3" != x""], [
	SQLITE3_CPPFLAGS="-I$with_sqlite3/include"
	SQLITE3_LIBS="-L$with_sqlite3/lib"

Modified extra.mk.in from [319d881146] to [6ad066ecd1].

1
2
3


4
5
6
7
8

9
10
11
OBJSQLITE3_SHARED_LIB = @OBJSQLITE3_SHARED_LIB@
OBJSQLITE3_STATIC_LIB = @OBJSQLITE3_STATIC_LIB@
OBJSQLITE3_FRAMEWORK = @OBJSQLITE3_FRAMEWORK@



EXCEPTIONS_A = @EXCEPTIONS_A@
EXCEPTIONS_EXCEPTIONS_A = @EXCEPTIONS_EXCEPTIONS_A@
EXCEPTIONS_EXCEPTIONS_LIB_A = @EXCEPTIONS_EXCEPTIONS_LIB_A@
EXCEPTIONS_LIB_A = @EXCEPTIONS_LIB_A@

OBJFW_CONFIG = @OBJFW_CONFIG@
OBJFW_FRAMEWORK_LIBS = @OBJFW_FRAMEWORK_LIBS@
OBJFW_LIBS = @OBJFW_LIBS@



>
>





>



1
2
3
4
5
6
7
8
9
10
11
12
13
14
OBJSQLITE3_SHARED_LIB = @OBJSQLITE3_SHARED_LIB@
OBJSQLITE3_STATIC_LIB = @OBJSQLITE3_STATIC_LIB@
OBJSQLITE3_FRAMEWORK = @OBJSQLITE3_FRAMEWORK@
OBJSQLITE3_LIB_MAJOR = 0
OBJSQLITE3_LIB_MINOR = 0

EXCEPTIONS_A = @EXCEPTIONS_A@
EXCEPTIONS_EXCEPTIONS_A = @EXCEPTIONS_EXCEPTIONS_A@
EXCEPTIONS_EXCEPTIONS_LIB_A = @EXCEPTIONS_EXCEPTIONS_LIB_A@
EXCEPTIONS_LIB_A = @EXCEPTIONS_LIB_A@
LIBOBJSQLITE3_DEP = @LIBOBJSQLITE3_DEP@
OBJFW_CONFIG = @OBJFW_CONFIG@
OBJFW_FRAMEWORK_LIBS = @OBJFW_FRAMEWORK_LIBS@
OBJFW_LIBS = @OBJFW_LIBS@

Added tests/Makefile version [7c413b6152].



























































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
PROG_NOINST = tests${PROG_SUFFIX}
SRCS = Tests.m

include ../buildsys.mk
include ../extra.mk

post-all: ${RUN_TESTS}

.PHONY: run
run:
	rm -f libobjsqlite3.so.${OBJSQLITE3_LIB_MAJOR}
	rm -f libobjsqlite3.so.${OBJSQLITE3_LIB_MAJOR_MINOR}
	rm -f objsqlite3.dll libobjsqlite3.${OBJSQLITE3_LIB_MAJOR}.dylib
	if test -f ../src/libobjsqlite3.so; then \
		${LN_S} ../src/libobjsqlite3.so \
		    libobjsqlite3.so.${OBJSQLITE3_LIB_MAJOR}; \
		${LN_S} ../src/libobjsqlite3.so \
		    libobjsqlite3.so.${OBJSQLITE3_LIB_MAJOR_MINOR}; \
	elif test -f ../src/libobjsqlite3.so.${OBJSQLITE3_LIB_MAJOR_MINOR}; \
	then \
		${LN_S} ../src/libobjsqlite3.so.${OBJSQLITE3_LIB_MAJOR_MINOR} \
		    libobjsqlite3.so.${OBJSQLITE3_LIB_MAJOR_MINOR}; \
	fi
	if test -f ../src/objsqlite3.dll; then \
		${LN_S} ../src/objsqlite3.dll objsqlite3.dll; \
	fi
	if test -f ../src/libobjsqlite3.dylib; then \
		${LN_S} ../src/libobjsqlite3.dylib \
		    libobjsqlite3.${OBJSQLITE3_LIB_MAJOR}.dylib; \
	fi
	LD_LIBRARY_PATH=.$${LD_LIBRARY_PATH+:}$$LD_LIBRARY_PATH \
	DYLD_FRAMEWORK_PATH=../src:../src/runtime$${DYLD_FRAMEWORK_PATH+:}$$DYLD_FRAMEWORK_PATH \
	DYLD_LIBRARY_PATH=.$${DYLD_LIBRARY_PATH+:}$$DYLD_LIBRARY_PATH \
	LIBRARY_PATH=.$${LIBRARY_PATH+:}$$LIBRARY_PATH \
	${WRAPPER} ./${PROG_NOINST}; EXIT=$$?; \
	rm -f libobjsqlite3.so.${OBJSQLITE3_LIB_MAJOR}; \
	rm -f objsqlite3.so.${OBJSQLITE3_LIB_MAJOR_MINOR} objsqlite3.dll; \
	rm -f libobjsqlite3.${OBJSQLITE3_LIB_MAJOR}.dylib; \
	exit $$EXIT

${PROG_NOINST}: ${LIBOBJSQLITE3_DEP}

CPPFLAGS += -I../src
LIBS := ${OBJFW_LIBS} ${LIBS}
LD = ${OBJC}

Added tests/Tests.m version [0c4d0bd79f].













































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 * Copyright (c) 2020, Jonathan Schleifer <js@nil.im>
 *
 * https://fossil.nil.im/objsqlite3
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice is present in all copies.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * 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 "SL3Connection.h"

@interface Tests: OFObject <OFApplicationDelegate>
@end

OF_APPLICATION_DELEGATE(Tests)

@implementation Tests
- (void)applicationDidFinishLaunching
{
	[OFApplication terminate];
}
@end