digitalmars.D - Properties for unittests
- qznc (8/14) Jul 02 2016 In general, it is a good idea to make unittests @safe and @nogc
- Lodovico Giaretta (5/19) Jul 02 2016 What emerged in a previous thread[1], unittests that can't be
- Lodovico Giaretta (3/8) Jul 02 2016 This post in particular:
In general, it is a good idea to make unittests safe and nogc in Phobos. When reviewing a pull request, we should check that. There is a pull request [0] which annotates system. Why would you do that? Is that somehow a desirable thing? Should a reviewer check for that? The spec for system [1] says:System functions are functions not marked with safe or trusted and are not nested inside safe functions. System functions may be marked with the system attribute. A function being system does not mean it actually is unsafe, it just means that the compiler is unable to verify that it cannot exhibit undefined behavior.[0] https://github.com/dlang/phobos/pull/4532 [1] https://dlang.org/spec/function.html#property-functions
Jul 02 2016
On Saturday, 2 July 2016 at 11:03:16 UTC, qznc wrote:In general, it is a good idea to make unittests safe and nogc in Phobos. When reviewing a pull request, we should check that. There is a pull request [0] which annotates system. Why would you do that? Is that somehow a desirable thing? Should a reviewer check for that? The spec for system [1] says:What emerged in a previous thread[1], unittests that can't be safe have to be explicitly marked system, so that it is obvious to the reader that the functionalities tested are not safe. [1] http://forum.dlang.org/thread/nkn1g6$b00$1 digitalmars.comSystem functions are functions not marked with safe or trusted and are not nested inside safe functions. System functions may be marked with the system attribute. A function being system does not mean it actually is unsafe, it just means that the compiler is unable to verify that it cannot exhibit undefined behavior.[0] https://github.com/dlang/phobos/pull/4532 [1] https://dlang.org/spec/function.html#property-functions
Jul 02 2016
On Saturday, 2 July 2016 at 11:25:51 UTC, Lodovico Giaretta wrote:What emerged in a previous thread[1], unittests that can't be safe have to be explicitly marked system, so that it is obvious to the reader that the functionalities tested are not safe. [1] http://forum.dlang.org/thread/nkn1g6$b00$1 digitalmars.comThis post in particular: http://forum.dlang.org/post/nkn25t$btk$1 digitalmars.com
Jul 02 2016
On Saturday, 2 July 2016 at 11:27:57 UTC, Lodovico Giaretta wrote:On Saturday, 2 July 2016 at 11:25:51 UTC, Lodovico Giaretta wrote:Thanks. I added this to the wiki: https://wiki.dlang.org/Get_involved#Review_pull_requestsWhat emerged in a previous thread[1], unittests that can't be safe have to be explicitly marked system, so that it is obvious to the reader that the functionalities tested are not safe. [1] http://forum.dlang.org/thread/nkn1g6$b00$1 digitalmars.comThis post in particular: http://forum.dlang.org/post/nkn25t$btk$1 digitalmars.com
Jul 02 2016
On Saturday, 2 July 2016 at 11:50:15 UTC, qznc wrote:On Saturday, 2 July 2016 at 11:27:57 UTC, Lodovico Giaretta wrote:Once all unittests in Phobos have annotations, we should enable an automatic test with Travis. Could be a simple Dscanner plugin.On Saturday, 2 July 2016 at 11:25:51 UTC, Lodovico Giaretta wrote:Thanks. I added this to the wiki: https://wiki.dlang.org/Get_involved#Review_pull_requestsWhat emerged in a previous thread[1], unittests that can't be safe have to be explicitly marked system, so that it is obvious to the reader that the functionalities tested are not safe. [1] http://forum.dlang.org/thread/nkn1g6$b00$1 digitalmars.comThis post in particular: http://forum.dlang.org/post/nkn25t$btk$1 digitalmars.com
Jul 02 2016