source: libyaml/trunk/tests/test-version.c @ 200

Revision 200, 346 bytes checked in by xi, 8 years ago (diff)

Move yaml/yaml.h to yaml.h and merge version.c to api.c.

RevLine 
[200]1#include <yaml.h>
[169]2
3#include <stdlib.h>
4#include <stdio.h>
5#include <assert.h>
6
7int
8main(void)
9{
[172]10    int major = -1;
11    int minor = -1;
12    int patch = -1;
[169]13    char buf[64];
14
15    yaml_get_version(&major, &minor, &patch);
16    sprintf(buf, "%d.%d.%d", major, minor, patch);
17    assert(strcmp(buf, yaml_get_version_string()) == 0);
18
19    return 0;
20}
Note: See TracBrowser for help on using the repository browser.