/* testoverlay.c generated by valac 0.16.1, the Vala compiler
 * generated from testoverlay.vala, do not modify */


#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <fsobasics.h>

#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))



#define ORIGINAL_CONTENT "Dieser Satz kein Verb!"
#define OVERLAY_CONTENT "This is the overlay content..."
void test_overlay (void);
void _vala_main (gchar** args, int args_length1);


void test_overlay (void) {
	gchar* _tmp3_ = NULL;
	gchar* contents;
	gboolean _tmp4_ = FALSE;
	{
		FsoFrameworkOverlayFile* _tmp0_;
		FsoFrameworkOverlayFile* overlay;
		gchar* _tmp1_ = NULL;
		gchar* original;
		gchar* _tmp2_ = NULL;
		gchar* contents;
		_tmp0_ = fso_framework_overlay_file_new ("./overlayfile.txt", OVERLAY_CONTENT);
		overlay = _tmp0_;
		_tmp1_ = fso_framework_file_handling_read ("./overlayfile.txt.saved");
		original = _tmp1_;
		g_assert (g_strcmp0 (original, ORIGINAL_CONTENT) == 0);
		_tmp2_ = fso_framework_file_handling_read ("./overlayfile.txt");
		contents = _tmp2_;
		g_assert (g_strcmp0 (contents, OVERLAY_CONTENT) == 0);
		_g_free0 (contents);
		_g_free0 (original);
		_g_object_unref0 (overlay);
	}
	_tmp3_ = fso_framework_file_handling_read ("./overlayfile.txt");
	contents = _tmp3_;
	g_assert (g_strcmp0 (contents, ORIGINAL_CONTENT) == 0);
	_tmp4_ = fso_framework_file_handling_isPresent ("./overlayfile.txt.saved");
	g_assert (!_tmp4_);
	_g_free0 (contents);
}


void _vala_main (gchar** args, int args_length1) {
	g_test_init (&args_length1, &args, NULL);
	g_test_run ();
}


int main (int argc, char ** argv) {
	g_thread_init (NULL);
	g_type_init ();
	_vala_main (argv, argc);
	return 0;
}



