ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/ermyth/test/metadata.C
Revision: 1.5
Committed: Thu Aug 30 19:56:26 2007 UTC (19 years, 2 months ago) by pippijn
Content type: text/plain
Branch: MAIN
Changes since 1.4: +2 -2 lines
Log Message:
- put faultcodes into their own namespace
- removed old files
- limited header garbage in atheme.h
- macros to inline bools for connection_t::is_*
- put some connection_t functions into the connection_t class

File Contents

# User Rev Content
1 pippijn 1.3 /*
2     * metadata.C: Metadata tests
3     * Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team
4     * Rights to this code are documented in doc/poddoc/gplicense.pod
5     *
6 pippijn 1.5 * $Id: metadata.C,v 1.4 2007-08-29 08:04:33 pippijn Exp $
7 pippijn 1.3 */
8    
9 pippijn 1.1 #include "unit/test.h"
10    
11     test<1> ()
12     {
13 pippijn 1.5 metadata::item *md;
14 pippijn 1.4 myuser_t *mu = myuser_t::create ("name", "pass", "email", 0);
15 pippijn 1.1
16 pippijn 1.3 md = mu->add_metadata ("cow", "moo");
17 pippijn 1.1 ensure_streq (md->value, "moo");
18     mu->del_metadata ("cow");
19     mu->add_metadata ("cow2", "moo2");
20     mu->clear_metadata ();
21 pippijn 1.3 md = mu->find_metadata ("moo");
22 pippijn 1.1 ensure_null (md);
23     }
24    
25     #include "unit/runtest.h"