diff options
author | Michael Jennings <mej@kainx.org> | 2004-12-15 00:00:22 +0000 |
---|---|---|
committer | Michael Jennings <mej@kainx.org> | 2004-12-15 00:00:22 +0000 |
commit | 1f8fb94cee78a838d4d85af6e03b101920a010de (patch) | |
tree | c6a0833cef2ea5fd249640fa3baa7e8f72f6919f /test | |
parent | 1a3feb3af38428f7657b98608200acfef32e543c (diff) | |
download | libast-1f8fb94cee78a838d4d85af6e03b101920a010de.tar.gz |
Tue Dec 14 17:51:20 2004 Michael Jennings (mej)
More work from my vacation. Turned the string class into both an
interface and an implementation, and created a new multipurpose buffer
class (untested) for arbitrary text/binary data. (Think "strings with
embedded newlines" if that helps.)
Now, if someone were so inclined, (s)he could create a LibAST
implementation of the "str" interface based on glib strings, or
QStrings, or whatever with almost no changes to the code using the
libast string API (once the function calls like spif_str_new() are
replaced with macro calls like SPIF_STR_NEW()).
A UTF-8-based string implementation is forthcoming.
----------------------------------------------------------------------
SVN revision: 12473
Diffstat (limited to 'test')
-rw-r--r-- | test/test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test.c b/test/test.c index 67a9b4b..ddd0bfc 100644 --- a/test/test.c +++ b/test/test.c @@ -636,7 +636,7 @@ int test_str(void) { spif_str_t teststr, test2str; - spif_class_t cls; + spif_strclass_t cls; char tmp[] = "this is a test"; spif_char_t buff[4096] = "abcde"; char tmp2[] = "string #1\nstring #2"; @@ -650,8 +650,8 @@ test_str(void) TEST_PASS(); TEST_BEGIN("spif_obj_get_classname() function"); - cls = spif_obj_get_class(SPIF_OBJ(teststr)); - TEST_FAIL_IF(cls != SPIF_CLASS_VAR(str)); + cls = SPIF_STR_CLASS(spif_obj_get_class(SPIF_OBJ(teststr))); + TEST_FAIL_IF(cls != SPIF_STR_CLASS(SPIF_STRCLASS_VAR(str))); TEST_PASS(); TEST_BEGIN("spif_str_del() function"); |