caelum0x 49b183818c Unify gitgram + aitimemachine into the monorepo (de-submodule) and merge vendored engines
Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as
opaque submodule gitlinks on GitHub) into fully-tracked first-party content.

AITM now merges its 7 vendored repos as first-party engines:
- memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts
- git: vendored C git (bundled binary) + gitnexus (in-process code intelligence)
- agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess)

Includes the full session's product build: Gitgram web/mobile/backend features,
AITM website/CLI/MCP, the unified memory layer, engine build tooling
(scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md),
and extensive test suites.

Build artifacts, node_modules, external/, and gemini-cli are gitignored.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 14:14:09 +03:00

86 lines
1.8 KiB
C

#include <sys/stat.h>
#include "clar.h"
static int file_size(const char *filename)
{
struct stat st;
if (stat(filename, &st) == 0)
return (int)st.st_size;
return -1;
}
void test_combined__cleanup(void)
{
cl_fixture_cleanup("test");
cl_assert(file_size("test/file") == -1);
}
void test_combined__1(void)
{
cl_assert(1);
cl_must_pass(0); /* 0 == success */
cl_must_fail(-1); /* <0 == failure */
cl_must_pass(-1); /* demonstrate a failing call */
}
void test_combined__2(void)
{
cl_fixture_sandbox("test");
cl_assert(file_size("test/nonexistent") == -1);
cl_assert(file_size("test/file") > 0);
cl_assert(100 == 101);
}
void test_combined__strings(void)
{
const char *actual = "expected";
cl_assert_equal_s("expected", actual);
cl_assert_equal_s_("expected", actual, "second try with annotation");
cl_assert_equal_s_("mismatched", actual, "this one fails");
}
void test_combined__strings_with_length(void)
{
const char *actual = "expected";
cl_assert_equal_strn("expected_", actual, 8);
cl_assert_equal_strn("exactly", actual, 2);
cl_assert_equal_strn_("expected_", actual, 8, "with annotation");
cl_assert_equal_strn_("exactly", actual, 3, "this one fails");
}
void test_combined__int(void)
{
int value = 100;
cl_assert_equal_i(100, value);
cl_assert_equal_i_(101, value, "extra note on failing test");
}
void test_combined__int_fmt(void)
{
int value = 100;
cl_assert_equal_i_fmt(022, value, "%04o");
}
void test_combined__bool(void)
{
int value = 100;
cl_assert_equal_b(1, value); /* test equality as booleans */
cl_assert_equal_b(0, value);
}
void test_combined__multiline_description(void)
{
cl_must_pass_(-1, "description line 1\ndescription line 2");
}
void test_combined__null_string(void)
{
const char *actual = NULL;
cl_assert_equal_s(actual, actual);
cl_assert_equal_s_("expected", actual, "this one fails");
}