/* libcr/tests/test_matrix.c - Tests for libcr
 *
 * Copyright (C) 2024  Luke T. Shumaker <lukeshu@lukeshu.com>
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

#include <libcr/coroutine.h>

int a = 1;

COROUTINE cr_init(void *) {
	cr_begin();
	a = 2;
	cr_end();
}

int main() {
	coroutine_add("init", cr_init, NULL);
	coroutine_main();
	if (a != 2)
		return 1;
	coroutine_main();
	return 0;
}