~ubuntu-branches/debian/stretch/alarm-clock-applet/stretch

« back to all changes in this revision

Viewing changes to src/tests/test_list_entry.c

  • Committer: Bazaar Package Importer
  • Author(s): Chow Loong Jin
  • Date: 2010-03-17 09:02:44 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100317090244-ni0ye04mva2hxe10
Tags: 0.3.0-1
* New upstream release
* debian/control:
  + No change bump of Standards-Version to 3.8.4
  + Update build-deps:
    - Drop libglade, libpanel-applet, libgnomevfs2, libgnome{2,ui}
    - Add libxml2-dev and libunique-dev, intltool
* debian/patches/01_update-alarms-eta,patch:
  + Dropped, applied upstream
* debian/(alarm-clock-applet.1, alarm-clock-applet.manpages):
  + Add manpage for alarm-clock-applet, now that the binary is moved to
    /usr/bin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 */
23
23
 
24
24
#include <glib.h>
 
25
#include <glib-object.h>
25
26
 
26
27
#include "list-entry.h"
27
28
 
38
39
{
39
40
        AlarmListEntry *entry = NULL;
40
41
        GList *list = NULL, *l;
41
 
        GnomeVFSResult result;
 
42
        GError *result;
42
43
        gchar *mime;
43
44
        guint i;
 
45
 
 
46
        g_type_init();
44
47
        
45
48
        // Test alarm list entry alloc
46
49
        entry = alarm_list_entry_new ("Name", "Some data", "Icon");
52
55
        alarm_list_entry_free(entry);
53
56
        
54
57
        // Test alarm list entry from file
55
 
        entry = alarm_list_entry_new_file("file:///usr/share/sounds/question.wav", &result, &mime);
 
58
        entry = alarm_list_entry_new_file("file:///usr/share/sounds/gnome/default/alerts/glass.ogg", &mime, &result);
56
59
        entry_dump (entry);
57
 
        g_print ("VFSResult: %s, MIME: %s\n", gnome_vfs_result_to_string(result), mime);
 
60
//      g_print ("VFSResult: %s, MIME: %s\n", gnome_vfs_result_to_string(result), mime);
58
61
        alarm_list_entry_free (entry);
59
62
        g_free (mime);
60
63
        
61
64
        // Test alarm list
62
 
        list = alarm_list_entry_list_new ("file:///usr/share/sounds/", NULL);
 
65
        list = alarm_list_entry_list_new ("file:///usr/share/sounds/gnome/default/alerts/", NULL);
63
66
        
64
67
        g_print ("\nGot %d entries: \n---\n", g_list_length(list));
65
68
        for (l = list, i = 0; l; l = l->next, i++) {