/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk
39 by Gustav Hartvigsson
* Added "check" target for testing.
1
#include "to_string.h"
2
#include "test_macros.h"
3
#include "SimpleTypeSystem.h"
4
int test_to_string (void) {
5
  setup_unit();
6
  char * m_str = NULL;
7
  SObject * obj = NULL;
8
  
9
  obj = s_object_new ();
10
  m_str = s_object_to_string (obj);
11
  
12
  test_case (m_str != NULL, "String is not NULL.");
13
  
68 by Gustav Hartvigsson
* Hid internals of SDynamicArray.
14
  test_case (strcmp (m_str, "(SObject, References: 1)") == 0, "string has as the correct value.");
39 by Gustav Hartvigsson
* Added "check" target for testing.
15
  
16
  s_print ("The string is: \"%s\"\n", m_str);
17
  
18
  s_object_unref (obj);
19
  free (m_str);
20
  
21
  end_unit();
22
}
23