summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorCorentin Noël <corentin.noel@collabora.com>2019-04-27 15:46:42 +0200
committerCorentin Noël <corentin.noel@collabora.com>2019-04-30 00:31:01 +0200
commit779e651528e12b8a8f451c4f945a1af928385701 (patch)
treef21c80772ccdadc4c9d9d458e5b43a745cc55527 /src/test
parentc6cff961c85198a3acdcca9540e3fd3623f46c89 (diff)
downloadlibical-git-779e651528e12b8a8f451c4f945a1af928385701.tar.gz
[libical-glib] Respect the gobject naming conventions
Make sure that ICalFoo methods are prefixed i_cal_foo. Always start method name with `new' when it is a creation method. Clone method are not creation methods, remove the `new' prefix. Remove _r suffix of methods returning ical strings as it is already clear.
Diffstat (limited to 'src/test')
-rwxr-xr-xsrc/test/libical-glib/component.py26
-rwxr-xr-xsrc/test/libical-glib/comprehensive.py16
-rwxr-xr-xsrc/test/libical-glib/duration.py16
-rwxr-xr-xsrc/test/libical-glib/misc.py12
-rwxr-xr-xsrc/test/libical-glib/parameter.py12
-rwxr-xr-xsrc/test/libical-glib/period.py12
-rwxr-xr-xsrc/test/libical-glib/property.py32
-rwxr-xr-xsrc/test/libical-glib/recurrence.py22
-rwxr-xr-xsrc/test/libical-glib/timezone.py12
-rwxr-xr-xsrc/test/libical-glib/value.py8
10 files changed, 84 insertions, 84 deletions
diff --git a/src/test/libical-glib/component.py b/src/test/libical-glib/component.py
index 870589be..d8443d4e 100755
--- a/src/test/libical-glib/component.py
+++ b/src/test/libical-glib/component.py
@@ -127,13 +127,13 @@ def foreachRecurrenceCb(comp, span, user_data):
#############################################################
def main():
- #Test as_ical_string_r
+ #Test as_ical_string
comp = ICalGLib.Component.new_from_string(event_str1);
- string = comp.as_ical_string_r();
+ string = comp.as_ical_string();
#Test new_clone
- clone = comp.new_clone();
- string1 = clone.as_ical_string_r();
+ clone = comp.clone();
+ string1 = clone.as_ical_string();
assert(string == string1);
assert(comp.is_valid() == 1);
assert(comp.isa_component() == 1);
@@ -150,7 +150,7 @@ def main():
#Test kind_to_string
kind_string = ICalGLib.Component.kind_to_string(ICalGLib.ComponentKind.VEVENT_COMPONENT);
- assert(ICalGLib.Component.string_to_kind(kind_string) == ICalGLib.ComponentKind.VEVENT_COMPONENT);
+ assert(ICalGLib.Component.kind_from_string(kind_string) == ICalGLib.ComponentKind.VEVENT_COMPONENT);
#Test child component manipulation
parent = ICalGLib.Component.new_from_string(event_str1);
@@ -227,20 +227,20 @@ def main():
component.add_property(ICalGLib.Property.new_from_string("SUMMARY:20140306T090000"));
assert(component.count_properties(ICalGLib.PropertyKind.SUMMARY_PROPERTY) == 3);
property1 = component.get_first_property(ICalGLib.PropertyKind.SUMMARY_PROPERTY);
- assert(property1.as_ical_string_r().split('\n', 1)[0] == "SUMMARY:Bastille Day Party\r");
+ assert(property1.as_ical_string().split('\n', 1)[0] == "SUMMARY:Bastille Day Party\r");
property2 = component.get_next_property(ICalGLib.PropertyKind.SUMMARY_PROPERTY);
- assert(property2.as_ical_string_r().split('\n', 1)[0] == "SUMMARY:event-uid-123\r");
+ assert(property2.as_ical_string().split('\n', 1)[0] == "SUMMARY:event-uid-123\r");
property3 = component.get_next_property(ICalGLib.PropertyKind.SUMMARY_PROPERTY);
- assert(property3.as_ical_string_r().split('\n', 1)[0] == "SUMMARY:20140306T090000\r");
+ assert(property3.as_ical_string().split('\n', 1)[0] == "SUMMARY:20140306T090000\r");
#Test getters and setters
#Test get_dtstart and get_dtend
comp = ICalGLib.Component.new_from_string(event_str1);
dtstart = comp.get_dtstart();
- start_string = ICalGLib.Time.as_ical_string_r(dtstart);
+ start_string = ICalGLib.Time.as_ical_string(dtstart);
assert(start_string == "20140306T090000");
dtend = comp.get_dtend();
- end_string = dtend.as_ical_string_r();
+ end_string = dtend.as_ical_string();
assert(end_string == "20140306T093000");
#Test span
@@ -249,8 +249,8 @@ def main():
assert(span.get_end() == 1394098200);
assert(span.get_is_busy() == 1);
utc = ICalGLib.Timezone.get_utc_timezone();
- comp.set_dtstart(ICalGLib.Time.from_timet_with_zone(1494096400, 0, utc));
- comp.set_dtend(ICalGLib.Time.from_timet_with_zone(1494098200, 0, utc));
+ comp.set_dtstart(ICalGLib.Time.new_from_timet_with_zone(1494096400, 0, utc));
+ comp.set_dtend(ICalGLib.Time.new_from_timet_with_zone(1494098200, 0, utc));
span = comp.get_span();
assert(span.get_start() == 1494096400);
assert(span.get_end() == 1494098200);
@@ -299,7 +299,7 @@ def main():
counter = TestCounter()
comp = ICalGLib.Component.new_from_string(recurring_str)
- comp.foreach_recurrence(ICalGLib.Time.from_string("20180321T000000Z"), ICalGLib.Time.from_string("20180323T235959Z"), foreachRecurrenceCb, counter)
+ comp.foreach_recurrence(ICalGLib.Time.new_from_string("20180321T000000Z"), ICalGLib.Time.new_from_string("20180323T235959Z"), foreachRecurrenceCb, counter)
assert counter.counter == 3
comp = ICalGLib.Component.new_from_string(event_str1);
diff --git a/src/test/libical-glib/comprehensive.py b/src/test/libical-glib/comprehensive.py
index d1ffed3a..09495864 100755
--- a/src/test/libical-glib/comprehensive.py
+++ b/src/test/libical-glib/comprehensive.py
@@ -179,7 +179,7 @@ def main():
parent.add_component(comp3);
parent.add_component(comp4);
- assert parent.as_ical_string_r() == combined_string;
+ assert parent.as_ical_string() == combined_string;
count = parent.count_components(ICalGLib.ComponentKind.VEVENT_COMPONENT);
child_component = parent.get_first_component(ICalGLib.ComponentKind.VEVENT_COMPONENT);
@@ -187,8 +187,8 @@ def main():
if (child_component.get_summary() == "childEvent2"):
child_component.set_summary("childEventTwo");
- start = ICalGLib.Time.from_string("20141115T211923");
- end = ICalGLib.Time.from_string("20141115T221923");
+ start = ICalGLib.Time.new_from_string("20141115T211923");
+ end = ICalGLib.Time.new_from_string("20141115T221923");
child_component.set_dtstart(start);
child_component.set_dtend(end);
@@ -202,7 +202,7 @@ def main():
if (i != count-1):
child_component = parent.get_next_component(ICalGLib.ComponentKind.VEVENT_COMPONENT);
- modifiedCombinedString = parent.as_ical_string_r();
+ modifiedCombinedString = parent.as_ical_string();
newParent = ICalGLib.Component.new_from_string(modifiedCombinedString);
count = parent.count_components(ICalGLib.ComponentKind.VEVENT_COMPONENT);
@@ -212,19 +212,19 @@ def main():
child_component.set_summary("childEventTwo");
dtstart = child_component.get_dtstart();
- start_string = ICalGLib.Time.as_ical_string_r(dtstart);
+ start_string = ICalGLib.Time.as_ical_string(dtstart);
assert(start_string == "20141115T211923");
dtend = child_component.get_dtend();
- end_string = ICalGLib.Time.as_ical_string_r(dtend);
+ end_string = ICalGLib.Time.as_ical_string(dtend);
assert(end_string == "20141115T221923");
timestamp = child_component.get_dtstamp();
- assert(ICalGLib.Time.as_ical_string_r(timestamp) == "20141115T211923");
+ assert(ICalGLib.Time.as_ical_string(timestamp) == "20141115T211923");
assert(child_component.get_location() == "East Lansing, MI, US");
assert(child_component.get_relcalid() == "relcalid for childEventTwo");
recurProperty = child_component.get_first_property(ICalGLib.PropertyKind.RRULE_PROPERTY);
- assert recurProperty.as_ical_string_r() == "RRULE:FREQ=DAILY;COUNT=5;INTERVAL=10\r\n";
+ assert recurProperty.as_ical_string() == "RRULE:FREQ=DAILY;COUNT=5;INTERVAL=10\r\n";
if (i != count-1):
child_component = parent.get_next_component(ICalGLib.ComponentKind.VEVENT_COMPONENT);
diff --git a/src/test/libical-glib/duration.py b/src/test/libical-glib/duration.py
index 6cfcdba2..ecd52b69 100755
--- a/src/test/libical-glib/duration.py
+++ b/src/test/libical-glib/duration.py
@@ -27,16 +27,16 @@ from gi.repository import ICalGLib
length = 1000000000;
bad_string = "This is a bad string";
-duration = ICalGLib.Duration.from_int(length);
+duration = ICalGLib.Duration.new_from_int(length);
assert(duration.as_int() == length);
-length_in_string = duration.as_ical_string_r();
-duration1 = ICalGLib.Duration.from_string(length_in_string);
-assert(duration1.as_ical_string_r() == length_in_string);
+length_in_string = duration.as_ical_string();
+duration1 = ICalGLib.Duration.new_from_string(length_in_string);
+assert(duration1.as_ical_string() == length_in_string);
assert(length == duration1.as_int());
-duration = ICalGLib.Duration.from_string(bad_string);
-duration_bad = ICalGLib.Duration.bad_duration();
-assert(duration.as_ical_string_r() == duration_bad.as_ical_string_r());
+duration = ICalGLib.Duration.new_from_string(bad_string);
+duration_bad = ICalGLib.Duration.new_bad_duration();
+assert(duration.as_ical_string() == duration_bad.as_ical_string());
assert(duration.is_bad_duration() == 1);
-duration_null = ICalGLib.Duration.null_duration();
+duration_null = ICalGLib.Duration.new_null_duration();
assert(duration_null.is_null_duration() == 1);
diff --git a/src/test/libical-glib/misc.py b/src/test/libical-glib/misc.py
index b7772180..2959fa97 100755
--- a/src/test/libical-glib/misc.py
+++ b/src/test/libical-glib/misc.py
@@ -27,7 +27,7 @@ from gi.repository import ICalGLib
geo = ICalGLib.Geo.new(10.0, 20.0)
assert geo.get_lat() == 10.0
assert geo.get_lon() == 20.0
-geo_clone = geo.new_clone()
+geo_clone = geo.clone()
assert geo.get_lat() == geo_clone.get_lat()
assert geo.get_lon() == geo_clone.get_lon()
geo_clone.set_lat(30.0)
@@ -37,14 +37,14 @@ assert geo_clone.get_lon() == 40.0
assert geo.get_lat() != geo_clone.get_lat()
assert geo.get_lon() != geo_clone.get_lon()
-start = ICalGLib.Time.from_string("20190130T111213Z");
-end = ICalGLib.Time.from_string("20190203T100908Z")
+start = ICalGLib.Time.new_from_string("20190130T111213Z");
+end = ICalGLib.Time.new_from_string("20190203T100908Z")
span = ICalGLib.TimeSpan.new(start, end, 0);
assert span.get_start() == start.as_timet()
assert span.get_end() == end.as_timet()
assert span.get_is_busy() == 0
-start = ICalGLib.Time.from_string("20190330T131415Z");
-end = ICalGLib.Time.from_string("20190403T070605Z")
+start = ICalGLib.Time.new_from_string("20190330T131415Z");
+end = ICalGLib.Time.new_from_string("20190403T070605Z")
span = ICalGLib.TimeSpan.new(start, end, 1);
assert span.get_start() == start.as_timet()
assert span.get_end() == end.as_timet()
@@ -54,7 +54,7 @@ span = ICalGLib.TimeSpan.new_timet(11, 22, 1)
assert span.get_start() == 11
assert span.get_end() == 22
assert span.get_is_busy() == 1
-span_clone = span.new_clone()
+span_clone = span.clone()
assert span.get_start() == span_clone.get_start()
assert span.get_end() == span_clone.get_end()
assert span.get_is_busy() == span_clone.get_is_busy()
diff --git a/src/test/libical-glib/parameter.py b/src/test/libical-glib/parameter.py
index f7cdbc10..cf4861cd 100755
--- a/src/test/libical-glib/parameter.py
+++ b/src/test/libical-glib/parameter.py
@@ -49,24 +49,24 @@ kind = ICalGLib.ParameterKind.ACTIONPARAM_PARAMETER;
parameter = ICalGLib.Parameter.new(kind);
assert(parameter.isa() == kind);
assert(parameter.isa_parameter() == 1);
-string = parameter.as_ical_string_r();
+string = parameter.as_ical_string();
assert(string == None);
-clone = parameter.new_clone();
+clone = parameter.clone();
assert(clone.isa() == kind);
assert(clone.isa_parameter() == 1);
-string = clone.as_ical_string_r();
+string = clone.as_ical_string();
assert(string == None);
string = ICalGLib.Parameter.kind_to_string(kind);
assert(string == "ACTIONPARAM");
-assert(ICalGLib.Parameter.string_to_kind(string) == kind);
+assert(ICalGLib.Parameter.kind_from_string(string) == kind);
value = "This is a value";
typevalue = string + "=" + value;
parameter = ICalGLib.Parameter.new_from_string(typevalue);
-assert(parameter.as_ical_string_r() == typevalue);
+assert(parameter.as_ical_string() == typevalue);
assert(parameter.isa() == kind);
assert(parameter.isa_parameter() == 1);
another_parameter = ICalGLib.Parameter.new_from_value_string(kind, value);
-assert(another_parameter.as_ical_string_r() == typevalue);
+assert(another_parameter.as_ical_string() == typevalue);
diff --git a/src/test/libical-glib/period.py b/src/test/libical-glib/period.py
index bdcbfb7e..955eac15 100755
--- a/src/test/libical-glib/period.py
+++ b/src/test/libical-glib/period.py
@@ -26,11 +26,11 @@ from gi.repository import ICalGLib
string = "19970101T183248Z/19970102T071625Z";
-period = ICalGLib.Period.from_string(string);
-retrieved_string = period.as_ical_string_r();
+period = ICalGLib.Period.new_from_string(string);
+retrieved_string = period.as_ical_string();
assert(retrieved_string == string);
-null_period = ICalGLib.Period.null_period();
+null_period = ICalGLib.Period.new_null_period();
assert(null_period.is_null_period() == 1);
assert(period.is_null_period() == 0);
@@ -57,8 +57,8 @@ duration = period.get_duration();
assert(duration.as_int() == 0);
string = "19970101T182346Z/PT5H30M";
-period = ICalGLib.Period.from_string(string);
-retrieved_string = period.as_ical_string_r();
+period = ICalGLib.Period.new_from_string(string);
+retrieved_string = period.as_ical_string();
assert(retrieved_string == string);
start = period.get_start();
@@ -78,4 +78,4 @@ assert(end.get_minute() == 0);
assert(end.get_second() == 0);
duration = period.get_duration();
-assert(duration.as_ical_string_r() == "PT5H30M");
+assert(duration.as_ical_string() == "PT5H30M");
diff --git a/src/test/libical-glib/property.py b/src/test/libical-glib/property.py
index cec09501..dbf056e6 100755
--- a/src/test/libical-glib/property.py
+++ b/src/test/libical-glib/property.py
@@ -25,16 +25,16 @@ gi.require_version('ICalGLib', '3.0')
from gi.repository import ICalGLib
action_property = ICalGLib.Property.new(ICalGLib.PropertyKind.ACKNOWLEDGED_PROPERTY);
-action_property_clone = action_property.new_clone();
-assert(action_property_clone.as_ical_string_r() == action_property.as_ical_string_r());
+action_property_clone = action_property.clone();
+assert(action_property_clone.as_ical_string() == action_property.as_ical_string());
property_string = "SUMMARY:Bastille Day Party";
string_property = ICalGLib.Property.new_from_string(property_string);
-string_property_clone = string_property.new_clone();
-assert(string_property.as_ical_string_r() == string_property_clone.as_ical_string_r());
+string_property_clone = string_property.clone();
+assert(string_property.as_ical_string() == string_property_clone.as_ical_string());
assert(string_property.isa() == ICalGLib.PropertyKind.SUMMARY_PROPERTY);
assert(string_property.isa_property() == 1);
-assert(string_property.get_property_name_r() == "SUMMARY");
+assert(string_property.get_property_name() == "SUMMARY");
altrep1 = "This is an altrep 1";
parameter1 = ICalGLib.Parameter.new_altrep(altrep1);
@@ -46,11 +46,11 @@ string_property.set_parameter_from_string("ACTIONPARAM", "This is a action param
assert(string_property.count_parameters() == 3);
retrieved_parameter1 = string_property.get_first_parameter(ICalGLib.ParameterKind.ALTREP_PARAMETER);
-assert(retrieved_parameter1.as_ical_string_r() == parameter1.as_ical_string_r());
+assert(retrieved_parameter1.as_ical_string() == parameter1.as_ical_string());
retrieved_parameter2 = string_property.get_next_parameter(ICalGLib.ParameterKind.ALTREP_PARAMETER);
-assert(retrieved_parameter2.as_ical_string_r() == parameter2.as_ical_string_r());
+assert(retrieved_parameter2.as_ical_string() == parameter2.as_ical_string());
retrieved_parameter3 = string_property.get_first_parameter(ICalGLib.ParameterKind.ACTIONPARAM_PARAMETER);
-assert(retrieved_parameter3.as_ical_string_r() == "ACTIONPARAM=This is a action param");
+assert(retrieved_parameter3.as_ical_string() == "ACTIONPARAM=This is a action param");
string_property.remove_parameter_by_kind(ICalGLib.ParameterKind.CHARSET_PARAMETER);
assert(string_property.count_parameters() == 3);
@@ -63,15 +63,15 @@ kind = ICalGLib.ValueKind.ATTACH_VALUE;
string = "This is a link";
value_from_string = ICalGLib.Value.new_from_string(kind, string);
string_property.set_value(value_from_string);
-string_from_property_api = string_property.get_value_as_string_r();
+string_from_property_api = string_property.get_value_as_string();
assert(string_from_property_api == string);
value_got_from_property = string_property.get_value();
-assert(value_got_from_property.as_ical_string_r() == string);
+assert(value_got_from_property.as_ical_string() == string);
string_property.set_value_from_string(string, ICalGLib.Value.kind_to_string(kind));
-string_from_property_api = string_property.get_value_as_string_r();
+string_from_property_api = string_property.get_value_as_string();
assert(string_from_property_api == string);
value_got_from_property = string_property.get_value();
-assert(value_got_from_property.as_ical_string_r() == string);
+assert(value_got_from_property.as_ical_string() == string);
string_property.set_x_name("This is an x name!");
assert(string_property.get_x_name() == "This is an x name!");
@@ -81,17 +81,17 @@ assert(valuekind_from_parametervalue == ICalGLib.ValueKind.BINARY_VALUE);
valuekind_from_property_kind = ICalGLib.Property.kind_to_value_kind(ICalGLib.PropertyKind.ACKNOWLEDGED_PROPERTY);
assert(valuekind_from_property_kind == ICalGLib.ValueKind.DATETIME_VALUE);
-propertyKind = ICalGLib.Property.value_kind_to_kind(valuekind_from_property_kind);
+propertyKind = ICalGLib.Value.kind_to_property_kind(valuekind_from_property_kind);
assert(propertyKind == ICalGLib.PropertyKind.ACKNOWLEDGED_PROPERTY);
string = ICalGLib.Property.kind_to_string(ICalGLib.PropertyKind.ACKNOWLEDGED_PROPERTY);
assert(string == "ACKNOWLEDGED");
-kind = ICalGLib.Property.string_to_kind(string);
+kind = ICalGLib.Property.kind_from_string(string);
assert(kind == ICalGLib.PropertyKind.ACKNOWLEDGED_PROPERTY);
string = ICalGLib.Property.method_to_string(ICalGLib.PropertyMethod.PUBLISH);
-assert(ICalGLib.Property.string_to_method(string) == ICalGLib.PropertyMethod.PUBLISH);
+assert(ICalGLib.Property.method_from_string(string) == ICalGLib.PropertyMethod.PUBLISH);
-string = ICalGLib.Property.enum_to_string_r(ICalGLib.PropertyMethod.PUBLISH);
+string = ICalGLib.Property.enum_to_string(ICalGLib.PropertyMethod.PUBLISH);
assert(string == "PUBLISH");
#Test i_cal_value_set_parent. No error will be thrown.
diff --git a/src/test/libical-glib/recurrence.py b/src/test/libical-glib/recurrence.py
index e5e99fb2..56520525 100755
--- a/src/test/libical-glib/recurrence.py
+++ b/src/test/libical-glib/recurrence.py
@@ -54,8 +54,8 @@ assert(ICalGLib.Recurrence.month_month(encoded) == 12)
assert(ICalGLib.Recurrence.month_is_leap(encoded))
string = "COUNT=10;FREQ=DAILY"
-recurrence = ICalGLib.Recurrence.from_string(string)
-assert(recurrence.as_string_r() == "FREQ=DAILY;COUNT=10")
+recurrence = ICalGLib.Recurrence.new_from_string(string)
+assert(recurrence.to_string() == "FREQ=DAILY;COUNT=10")
by_second = recurrence.get_by_second_array()
# The value is dependent on the libical version.
@@ -248,9 +248,9 @@ recurrence.set_by_second(0, 13)
by_second = recurrence.get_by_second_array()
assert by_second[0] == 13
-recurrence = ICalGLib.Recurrence.from_string(string)
+recurrence = ICalGLib.Recurrence.new_from_string(string)
-assert(ICalGLib.recur_string_to_weekday("MO") == ICalGLib.RecurrenceWeekday.MONDAY_WEEKDAY)
+assert(ICalGLib.Recurrence.weekday_from_string("MO") == ICalGLib.RecurrenceWeekday.MONDAY_WEEKDAY)
start = 100000
result = ICalGLib.recur_expand_recurrence(string, start, 10)
@@ -260,7 +260,7 @@ for i in range(0, 9):
string = "19970101T183248Z/19970102T071625Z"
-period = ICalGLib.Period.from_string(string)
+period = ICalGLib.Period.new_from_string(string)
start = period.get_start()
iter = ICalGLib.RecurIterator.new(recurrence, start)
@@ -273,21 +273,21 @@ while day != 0:
timetype = iter.next()
day = timetype.get_day()
-recurrence = ICalGLib.Recurrence.from_string("FREQ=YEARLY;COUNT=10")
-start = ICalGLib.Time.from_string("20161224T000000Z")
+recurrence = ICalGLib.Recurrence.new_from_string("FREQ=YEARLY;COUNT=10")
+start = ICalGLib.Time.new_from_string("20161224T000000Z")
iter = ICalGLib.RecurIterator.new(recurrence, start)
-start = ICalGLib.Time.from_string("20181224T000000Z")
+start = ICalGLib.Time.new_from_string("20181224T000000Z")
assert ICalGLib.RecurIterator.set_start(iter, start) == 0
-recurrence = ICalGLib.Recurrence.from_string("FREQ=YEARLY")
-start = ICalGLib.Time.from_string("20161224T000000Z")
+recurrence = ICalGLib.Recurrence.new_from_string("FREQ=YEARLY")
+start = ICalGLib.Time.new_from_string("20161224T000000Z")
iter = ICalGLib.RecurIterator.new(recurrence, start)
-start = ICalGLib.Time.from_string("20181224T000000Z")
+start = ICalGLib.Time.new_from_string("20181224T000000Z")
assert ICalGLib.RecurIterator.set_start(iter, start) == 1
timetype = iter.next()
diff --git a/src/test/libical-glib/timezone.py b/src/test/libical-glib/timezone.py
index bb8ef238..2be519b6 100755
--- a/src/test/libical-glib/timezone.py
+++ b/src/test/libical-glib/timezone.py
@@ -64,7 +64,7 @@ assert utc == utc2
time = ICalGLib.Time.new();
before = time.get_hour();
-ICalGLib.timezone_convert_time(time, la, chicago);
+ICalGLib.Time.convert_timezone(time, la, chicago);
after = time.get_hour();
assert abs(after - before) == 2;
ICalGLib.Time.set_timezone(time, utc);
@@ -72,7 +72,7 @@ assert ICalGLib.Time.get_timezone(time) == utc;
ICalGLib.Time.set_timezone(time, la);
assert ICalGLib.Time.get_timezone(time) == la;
-timeclone = time.new_clone()
+timeclone = time.clone()
assert time != timeclone
time = ICalGLib.Time.convert_to_zone(time, chicago)
timeclone.convert_to_zone_inplace(chicago)
@@ -87,7 +87,7 @@ assert time.is_date() == timeclone.is_date();
assert time.is_daylight() == timeclone.is_daylight();
assert time.is_utc() == timeclone.is_utc();
-timeclone = ICalGLib.Time.new_clone(time);
+timeclone = ICalGLib.Time.clone(time);
assert time != timeclone;
assert ICalGLib.Time.get_year(time) == ICalGLib.Time.get_year(timeclone);
assert ICalGLib.Time.get_month(time) == ICalGLib.Time.get_month(timeclone);
@@ -124,12 +124,12 @@ assert array[2] == 10
component = la.get_component();
timezone = ICalGLib.Timezone.new();
-timezone.set_component(ICalGLib.Component.new_clone(component));
+timezone.set_component(ICalGLib.Component.clone(component));
assert timezone.get_location() == la.get_location();
array = ICalGLib.Timezone.array_new();
-ICalGLib.Timezone.array_append_from_vtimezone(array, ICalGLib.Component.new_clone(la.get_component()));
-ICalGLib.Timezone.array_append_from_vtimezone(array, ICalGLib.Component.new_clone(chicago.get_component()));
+ICalGLib.Timezone.array_append_from_vtimezone(array, ICalGLib.Component.clone(la.get_component()));
+ICalGLib.Timezone.array_append_from_vtimezone(array, ICalGLib.Component.clone(chicago.get_component()));
assert array.size() == 2;
timezone1 = ICalGLib.Timezone.array_element_at(array, 0);
assert timezone1.get_display_name() == la.get_display_name();
diff --git a/src/test/libical-glib/value.py b/src/test/libical-glib/value.py
index 45e32d8d..6ae2615b 100755
--- a/src/test/libical-glib/value.py
+++ b/src/test/libical-glib/value.py
@@ -32,13 +32,13 @@ assert(value.isa_value() == 1);
string = "This is a link";
value_from_string = ICalGLib.Value.new_from_string(kind, string);
-assert(value_from_string.as_ical_string_r() == string);
+assert(value_from_string.as_ical_string() == string);
assert(value_from_string.is_valid() == 1);
assert(value_from_string.isa() == kind);
assert(value_from_string.isa_value() == 1);
-value_from_string_clone = value_from_string.new_clone();
-assert(value_from_string_clone.as_ical_string_r() == string);
+value_from_string_clone = value_from_string.clone();
+assert(value_from_string_clone.as_ical_string() == string);
assert(value_from_string_clone.is_valid() == 1);
assert(value_from_string_clone.isa() == kind);
assert(value_from_string_clone.isa_value() == 1);
@@ -64,7 +64,7 @@ assert(compare_result == ICalGLib.ParameterXliccomparetype.NOTEQUAL);
kind_string = ICalGLib.Value.kind_to_string(kind);
assert(kind_string == "ATTACH");
-converted_kind = ICalGLib.Value.string_to_kind(kind_string);
+converted_kind = ICalGLib.Value.kind_from_string(kind_string);
assert(converted_kind == kind);
szText = "This is a text\nand this is a new line";