File indexing completed on 2024-04-28 16:01:12
0001 /* 0002 * SPDX-FileCopyrightText: 2020-2021 Han Young <hanyoung@protonmail.com> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 #include "hourlyweatherforecasttest.h" 0007 0008 void HourlyForecastTest::testJson() 0009 { 0010 HourlyWeatherForecast d1(QDateTime::currentDateTime()); 0011 0012 auto d2 = HourlyWeatherForecast::fromJson(d1.toJson()); 0013 0014 QCOMPARE(d2.toJson(), d1.toJson()); 0015 } 0016 QTEST_MAIN(HourlyForecastTest)