From 295472d7a2e030d28af6851afb9d2ea9038a8c25 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Wed, 17 May 2006 11:04:21 +0000 Subject: [PATCH] add 'hello world' testcase for libgphoto2-sharp git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8806 67ed7778-7388-44ab-90cf-0a291f65f57c --- bindings/csharp/Makefile.am | 16 +++++++++++++++- bindings/csharp/TestGphoto2Sharp.cs | 7 +++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 bindings/csharp/TestGphoto2Sharp.cs diff --git a/bindings/csharp/Makefile.am b/bindings/csharp/Makefile.am index ba3c6b832..cbc1c8b6a 100644 --- a/bindings/csharp/Makefile.am +++ b/bindings/csharp/Makefile.am @@ -27,6 +27,19 @@ cslib_DATA = \ libgphoto2-sharp.dll: $(LIBGPHOTO2_SHARP_GENERATED_CSFILES) $(LIBGPHOTO2_SHARP_CSFILES) $(MCS) $(MCSFLAGS) -out:$@ /target:library $(LIBGPHOTO2_SHARP_GENERATED_CSFILES) $(LIBGPHOTO2_SHARP_CSFILES) +TestGphoto2Sharp.exe: $(srcdir)/TestGphoto2Sharp.cs + $(MCS) $(MCSFLAGS) -out:$@ $< + +check_SCRIPTS = TestGphoto2Sharp +check_DATA = TestGphoto2Sharp.exe + +TESTS = $(check_SCRIPTS) + +TestGphoto2Sharp: Makefile $(srcdir)/TestGphoto2Sharp.cs + echo '#!/bin/sh' > $@ + echo '$(MONO) $$(dirname "$$0")/TestGphoto2Sharp.exe' >> $@ + chmod +x $@ + EXTRA_DIST = \ libgphoto2-sharp.dll.config \ libgphoto2-sharp.pc.in \ @@ -35,5 +48,6 @@ EXTRA_DIST = \ CLEANFILES = \ libgphoto2-sharp.dll.mdb \ - libgphoto2-sharp.dll + libgphoto2-sharp.dll \ + TestGphoto2Sharp diff --git a/bindings/csharp/TestGphoto2Sharp.cs b/bindings/csharp/TestGphoto2Sharp.cs new file mode 100644 index 000000000..20ad74994 --- /dev/null +++ b/bindings/csharp/TestGphoto2Sharp.cs @@ -0,0 +1,7 @@ +class Gphoto2SharpTest { + public static int Main() { + System.Console.WriteLine("Testing libgphoto2-sharp..."); + // Return non-0 when test fails + return 0; + } +}