From 6874753bfba638ab819bfa92ad8cd7a878ae7701 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Thu, 31 Mar 2016 10:55:01 -0300 Subject: Update tests. --- src/appointment.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/appointment.cpp') diff --git a/src/appointment.cpp b/src/appointment.cpp index a6800dd..e014a85 100644 --- a/src/appointment.cpp +++ b/src/appointment.cpp @@ -27,22 +27,22 @@ namespace datetime { ***** ****/ -bool Alarm::operator==(const Alarm& that) const +Alarm::Alarm() + : type(Alarm::None) { - return (type==that.type) - && (text==that.text) - && (audio_url==that.audio_url) - && (this->time==that.time); } -bool Alarm::has_sound() const +Alarm::Alarm(int type_, const std::string &text_, const std::string& audio_url_, const DateTime &time_) + : type(type_), text(text_), audio_url(audio_url_), time(time_) { - return !audio_url.empty(); } -bool Alarm::has_text() const +bool Alarm::operator==(const Alarm& that) const { - return !text.empty(); + return (type==that.type) + && (text==that.text) + && (audio_url==that.audio_url) + && (this->time==that.time); } bool Appointment::operator==(const Appointment& that) const -- cgit v1.2.3