~roger-booth/mysql-proxy/laminator

« back to all changes in this revision

Viewing changes to tests/unit/t_network_mysqld_masterinfo.c

  • Committer: jan at mysql
  • Date: 2009-05-28 17:21:25 UTC
  • mto: This revision was merged to the branch mainline in revision 638.
  • Revision ID: jan@mysql.com-20090528172125-nog3puwmthbojgpy
use the doc/architecture.txt as "@mainpage" for the doxygen output

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 */
37
37
 
38
38
/*@{*/
 
39
/**
 
40
 * @test check that network_mysqld_masterinfo_new() returns non-NULL 
 
41
 *   and that network_mysqld_masterinfo_free() doesn't crash
 
42
 */
39
43
void t_masterinfo_new(void) {
40
44
        network_mysqld_masterinfo_t *info;
41
45
 
45
49
        network_mysqld_masterinfo_free(info);
46
50
}
47
51
 
 
52
/**
 
53
 * @test 
 
54
 *   network_mysqld_masterinfo_get() can decode a protocol string and
 
55
 *   network_mysqld_masterinfo_append() can encode the internal structure and 
 
56
 *     turns it back into the orignal string
 
57
 */
48
58
void t_masterinfo_get(void) {
49
59
#define PACKET "15\nhostname-bin.000024\n2143897\n127.0.0.1\nroot\n123\n3306\n60\n0\n\n\n\n\n\n0\n"
50
60
        network_mysqld_masterinfo_t *info;
81
91
 
82
92
        network_mysqld_masterinfo_free(info);
83
93
}
 
94
 
 
95
/**
 
96
 * @cond
 
97
 *   don't include the main() function the docs
 
98
 */
84
99
int main(int argc, char **argv) {
85
100
        g_test_init(&argc, &argv, NULL);
86
101
        g_test_bug_base("http://bugs.mysql.com/");
90
105
 
91
106
        return g_test_run();
92
107
}
 
108
/** @endcond */
93
109
#else
94
110
int main() {
95
111
        return 77;