<commit_before>#include <gtk/gtk.h>
#include <stdlib.h>
#include <math.h>

#include "goat-plot.h"

void destroy(GtkWidget *widget, gpointer data)
{
	g_print ("\n\n>>>>> creating screenshot...\n");
	{
		cairo_surface_t *surface;
		cairo_t *cr;
		GtkAllocation allocation;

		gtk_widget_get_allocation (widget, &allocation);
		surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, allocation.height, allocation.width);
		g_assert (surface);
		cr = cairo_create (surface);
		gtk_widget_draw (GTK_WIDGET (widget), cr);
		g_assert (cairo_surface_write_to_png (surface, "../../screenshot.png") == CAIRO_STATUS_SUCCESS);
		cairo_surface_destroy (surface);
		cairo_destroy (cr);
	}
	g_print ("\n\n>>>>> exiting test-simple...\n");
    gtk_main_quit();
}

gboolean
self_destruct (GtkWidget *widget)
{
	destroy (widget, NULL);
	return G_SOURCE_REMOVE;
}

#define TEST_MULTIPLE 1
int
main (int argc, char *argv[])
{
	GtkWidget *window;
	GoatPlot *plot;
	int i;

	gtk_init (&argc, &argv);

	window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
	plot = goat_plot_new ();<commit_msg>test: Generate screenshot.png in build, move manually if desired.<commit_after>#include <gtk/gtk.h>
#include <stdlib.h>
#include <math.h>

#include "goat-plot.h"

void destroy(GtkWidget *widget, gpointer data)
{
	g_print ("\n\n>>>>> creating screenshot...\n");
	{
		cairo_surface_t *surface;
		cairo_t *cr;
		GtkAllocation allocation;

		gtk_widget_get_allocation (widget, &allocation);
		surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, allocation.height, allocation.width);
		g_assert (surface);
		cr = cairo_create (surface);
		gtk_widget_draw (GTK_WIDGET (widget), cr);
		g_assert (cairo_surface_write_to_png (surface, "./screenshot.png") == CAIRO_STATUS_SUCCESS);
		cairo_surface_destroy (surface);
		cairo_destroy (cr);
	}
	g_print ("\n\n>>>>> exiting test-simple...\n");
    gtk_main_quit();
}

gboolean
self_destruct (GtkWidget *widget)
{
	destroy (widget, NULL);
	return G_SOURCE_REMOVE;
}

#define TEST_MULTIPLE 1
int
main (int argc, char *argv[])
{
	GtkWidget *window;
	GoatPlot *plot;
	int i;

	gtk_init (&argc, &argv);

	window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
	plot = goat_plot_new ();
{'fraction_non_alphanumeric': 0.14285714285714285, 'fraction_numerical': 0.0027472527472527475, 'mean_word_length': 5.260744985673353, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '613229', 'n_tokens_mistral': 888, 'n_tokens_neox': 827, 'n_words': 180}