digitalmars.D.learn - unittests D2.065.0 window 7
- Phillip Shelton (19/19) May 26 2014 I have the following code in a file called ex43.d
- =?UTF-8?B?QWxpIMOHZWhyZWxp?= (7/9) May 26 2014 It is the -run variable. dmd says:
- Phillip Shelton (2/13) May 26 2014 Thank you.
I have the following code in a file called ex43.d dstring toFront(dstring str, in dchar letter) { dstring result; return result; } unittest { immutable str = "hello"d; assert(toFront(str, 'h') == "hello"); assert(toFront(str, 'o') == "ohell"); assert(toFront(str, 'l') == "llheo"); } void main() {} When I compile this code with dmd -run ex43.d -w -unittest there is no output. Is there some path that needs to be added to the PATH variable? Phillip
May 26 2014
On 05/26/2014 08:30 PM, Phillip Shelton wrote:When I compile this code with dmd -run ex43.d -w -unittest there is no output.It is the -run variable. dmd says: -run srcfile args... run resulting program, passing args So, both -w and -unittest become arguments to your compiled program, not to dmd. The following order of command line switches works: dmd -w -unittest -run ex43.d Ali
May 26 2014
On Tuesday, 27 May 2014 at 04:03:27 UTC, Ali Çehreli wrote:On 05/26/2014 08:30 PM, Phillip Shelton wrote:Thank you.When I compile this code with dmd -run ex43.d -w -unittestthere is nooutput.It is the -run variable. dmd says: -run srcfile args... run resulting program, passing args So, both -w and -unittest become arguments to your compiled program, not to dmd. The following order of command line switches works: dmd -w -unittest -run ex43.d Ali
May 26 2014