ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/ermyth/test/metadata.C
Revision: 1.3
Committed: Tue Aug 28 17:08:13 2007 UTC (19 years, 1 month ago) by pippijn
Content type: text/plain
Branch: MAIN
Changes since 1.2: +10 -1 lines
Log Message:
- changed name
- updated the example config to the new system
- added more documentation
- enhanced documentation generators
- added a link to the pdf to the website
- added an RSS feed generator
- transitioned hooks to c++ callbacks
- did various merges with upstream along the way
- added const where appropriate
- removed the old block allocator
- fixed most memory leaks
- transitioned some dictionaries to std::map
- transitioned some lists to std::vector
- made some free functions members where appropriate
- renamed string to dynstr and added a static string ststr
- use NOW instead of time (NULL) if possible
- completely reworked database backends, crypto handlers and protocol handlers
  to use an object factory
- removed the old module system. ermyth does not do any dynamic loading anymore
- fixed most of the build system
- reworked how protocol commands work

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     * $Id$
7     */
8    
9 pippijn 1.1 #include "unit/test.h"
10    
11     test<1> ()
12     {
13     metadata *md;
14     myuser_t *mu = myuser_add ("name", "pass", "email", 0);
15    
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"