• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

CLI interface to medialist (fossil mirror)


Commit MetaInfo

Revision56eb31438d1861798b802417730960cd84d77b2f (tree)
Zeit2023-03-09 11:04:06
Autormio <stigma@disr...>
Commitermio

Log Message

Update unittests for nothrow versions

FossilOrigin-Name: c9c18cf87088755c69c8f59b89a3dba592c1aa83259845d72fbf96c5642e9215

Ändern Zusammenfassung

Diff

--- a/unittests.d
+++ b/unittests.d
@@ -123,7 +123,7 @@ unittest
123123 MLError ec = ml_send_command(ml, MLCommand.add, ["Item 1"]);
124124 assert(MLError.success == ec, "Failed to send ADD command [Item 1].");
125125
126- MediaListItem item1 = ml_fetch_item(ml, 1, &ec);
126+ MediaListItem item1 = ml_fetch_item(ml, 1, ec);
127127 assert(MLError.success == ec, "Failed to FETCH id 1.");
128128 assert(item1.startDate == "", "Non-empty start date for new item.");
129129 assert(item1.endDate == "", "Non-empty end date for new item.");
@@ -131,7 +131,7 @@ unittest
131131 ec = ml_send_command(ml, MLCommand.update, ["1", "start_date::2021-11-25"]);
132132 assert(MLError.success == ec, "Failed to send UPDATE command to change start date.");
133133
134- item1 = ml_fetch_item(ml, 1, &ec);
134+ item1 = ml_fetch_item(ml, 1, ec);
135135 assert(MLError.success == ec, "Failed to FETCH id 1.");
136136 assert(item1.startDate == "2021-11-25", "Failed to update start date to '2021-11-25'.");
137137 assert(item1.endDate == "", "Non-empty end date encountered");
@@ -139,7 +139,7 @@ unittest
139139 ec = ml_send_command(ml, MLCommand.update, ["1", "end_date::2021-11-25"]);
140140 assert(MLError.success == ec, "Failed to send UPDATE command to change end date.");
141141
142- item1 = ml_fetch_item(ml, 1, &ec);
142+ item1 = ml_fetch_item(ml, 1, ec);
143143 assert(MLError.success == ec, "Failed to FETCH id 1.");
144144 assert(item1.startDate == "2021-11-25", "Failed to retain start date as '2021-11-25'.");
145145 assert(item1.endDate == "2021-11-25", "Failed to update end date to '2021-11-25'.");
@@ -176,7 +176,7 @@ unittest
176176
177177 string currentDate = format!"%d-%02d-%02d"(date.year, date.month, date.day);
178178
179- MediaListItem item = ml_fetch_item(ml, 1, &err);
179+ MediaListItem item = ml_fetch_item(ml, 1, err);
180180 assert(MLError.success == err, "Failed to FETCH item ID 1.");
181181 assert(item.lastUpdated == currentDate,
182182 "'last_updated' field does not match the current date.");
@@ -265,7 +265,7 @@ unittest
265265 assert(null !is list, "Memory allocation failed (list is null).");
266266 assert(true == exists(listPath), "A new file wasn't created for the list.");
267267
268- MediaListHeader[] headers = ml_fetch_headers(list, null);
268+ MediaListHeader[] headers = ml_fetch_headers(list);
269269 assert(null !is headers, "Failed to parse headers");
270270
271271 foreach(const ref header; headers) {
@@ -309,7 +309,7 @@ unittest
309309 string currentDS = format!"%d-%02d-%02d"(currentD.year,
310310 currentD.month, currentD.day);
311311
312- MediaListHeader[] headers = ml_fetch_headers(list, null);
312+ MediaListHeader[] headers = ml_fetch_headers(list);
313313 assert(null !is headers, "Failed to fetch headers from list.");
314314 assert(sections.length == headers.length,
315315 "Differing amount of headers in unit test file.");
@@ -381,7 +381,7 @@ unittest
381381 string currentDS = format!"%d-%02d-%02d"(currentD.year,
382382 currentD.month, currentD.day);
383383
384- MediaListHeader[] headers = ml_fetch_headers(list, null);
384+ MediaListHeader[] headers = ml_fetch_headers(list);
385385 assert(null !is headers, "Failed to fetch headers from list.");
386386 assert(sections.length == headers.length,
387387 "Differing amount of headers in unit test file.");
@@ -454,7 +454,7 @@ unittest
454454 string currentDS = format!"%d-%02d-%02d"(currentD.year,
455455 currentD.month, currentD.day);
456456
457- MediaListHeader[] headers = ml_fetch_headers(list, null);
457+ MediaListHeader[] headers = ml_fetch_headers(list);
458458 assert(null !is headers, "Failed to fetch headers from list.");
459459 assert(sections.length == headers.length,
460460 "Differing amount of headers in unit test file.");
@@ -527,7 +527,7 @@ unittest
527527 string currentDS = format!"%d-%02d-%02d"(currentD.year,
528528 currentD.month, currentD.day);
529529
530- MediaListHeader[] headers = ml_fetch_headers(list, null);
530+ MediaListHeader[] headers = ml_fetch_headers(list);
531531 assert(null !is headers, "Failed to fetch headers from list.");
532532 assert(sections.length == headers.length,
533533 "Differing amount of headers in unit test file.");
@@ -585,7 +585,7 @@ unittest
585585 assert(MLError.success == ec,
586586 `Failed to send MLCommand.add ["Item 2", "1/-", "READING"].`);
587587
588- MediaListItem item2 = ml_fetch_item(list, 2, &ec);
588+ MediaListItem item2 = ml_fetch_item(list, 2, ec);
589589 assert(MLError.success == ec,
590590 `Failed to fetch item 2 (ec == ` ~ to!string(ec) ~ `).`);
591591
@@ -719,7 +719,7 @@ unittest
719719 assert(MLError.success == res,
720720 `Failed to send MLCommand.update ["1", "title::Item 1"].`);
721721
722- MediaListItem item = ml_fetch_item(list, 1, &res);
722+ MediaListItem item = ml_fetch_item(list, 1, res);
723723 assert(MLError.success == res, `Failed to fetch item 1 from list.`);
724724
725725 assert("Item 1" == item.title,
@@ -750,7 +750,7 @@ unittest
750750 assert(MLError.success == res,
751751 `Failed to send MLCommand.update ["1", "status::READING"].`);
752752
753- MediaListItem item = ml_fetch_item(list, 1, &res);
753+ MediaListItem item = ml_fetch_item(list, 1, res);
754754 assert(MLError.success == res, `Failed to fetch item 1 from list.`);
755755
756756 assert("READING" == item.status,
@@ -820,7 +820,7 @@ unittest
820820 `"end_date::2022-01-20", "progress::60/100", "status::READING", ` ~
821821 `"title::MediaList"].`);
822822
823- MediaListItem item = ml_fetch_item(list, 1, &res);
823+ MediaListItem item = ml_fetch_item(list, 1, res);
824824 assert(MLError.success == res, `Failed to fetch item 1 from list.`);
825825
826826 assert("MediaList" == item.title,
@@ -859,7 +859,7 @@ unittest
859859 res = ml_send_command(list, MLCommand.add, ["Item 1", null, "PLAN-TO-READ"]);
860860 assert(MLError.success == res, `Failed to send add command ["Item 1", null, "PLAN-TO-READ"]`);
861861
862- MediaListItem item1 = ml_fetch_item(list, 1, &res);
862+ MediaListItem item1 = ml_fetch_item(list, 1, res);
863863 assert(MLError.success == res, `Failed to fetch item 1`);
864864
865865 assert("" == item1.startDate, "New item with no provided start date is not blank");
@@ -868,7 +868,7 @@ unittest
868868 res = ml_send_command(list, MLCommand.update, ["1", "status::READING"]);
869869 assert(MLError.success == res, `Failed to send update command [1, status::READING]`);
870870
871- item1 = ml_fetch_item(list, 1, &res);
871+ item1 = ml_fetch_item(list, 1, res);
872872 assert(MLError.success == res, `Failed to fetch item 1`);
873873
874874 assert("" != item1.startDate, "PLAN-TO-READ to READING does not change empty start date.");
@@ -879,7 +879,7 @@ unittest
879879 res = ml_send_command(list, MLCommand.update, ["1", "status::COMPLETE"]);
880880 assert(MLError.success == res, `Failed to send update command [1, status::COMPLETE]`);
881881
882- item1 = ml_fetch_item(list, 1, &res);
882+ item1 = ml_fetch_item(list, 1, res);
883883 assert(MLError.success == res, `Failed to fetch item 1`);
884884
885885 assert(startDate == item1.startDate, `READING to COMPLETE changed start date.`);