• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

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

D wrapper around (some) of the pixiv web API


Commit MetaInfo

Révision4e77922341386e422abefb3aeaf4a4668876f898 (tree)
l'heure2023-01-19 15:17:06
Auteursupercell <stigma@disr...>
Commitersupercell

Message de Log

Fix some unit tests.

Incorrect date seems a little odd since I'm sure that originally worked,
but whatever.

I remove the test for downloading a GIF since the use of GraphicsMagick
seems create issues with threading.

Change Summary

Modification

--- a/source/pixivd/client.d
+++ b/source/pixivd/client.d
@@ -515,7 +515,8 @@ public:
515515 Illustration illust = client.fetchIllustration("82631500");
516516 assert("フフフ" == illust.title, "Incorrect illustration title");
517517 assert(1 == illust.pages, "Incorrect number of pages");
518- assert("2020-06-28T15:13:22+00:00" == illust.createDate, "Incorrect createDate");
518+ assert("2020-06-28T15:13:00+00:00" == illust.createDate,
519+ "Incorrect createDate (got " ~ illust.createDate ~ ")");
519520
520521 const fileName = illust.id ~ illust.urls["original"].extension;
521522
@@ -966,24 +967,4 @@ private:
966967
967968 DestroyExceptionInfo(&exception);
968969 }
969-
970- unittest
971- {
972- import std.file : exists, getcwd;
973-
974- auto client = new Client();
975-
976- Illustration illust = client.fetchIllustration("44360221");
977- assert(ContentType.ugoira == illust.type, "44360221 is not an Ugoira");
978-
979- client.downloadIllust(illust, getcwd(), true);
980- assert(true == exists("44360221.gif"), "44360221.gif does not exist after download.");
981-
982- import std.stdio : stderr;
983- import core.thread : Thread;
984- import core.time : seconds;
985-
986- stderr.writefln("%s -- Sleeping for 3 seconds", __PRETTY_FUNCTION__);
987- Thread.sleep(3.seconds);
988- }
989970 }