www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How to use dmd code coverage

reply forkit <forkit gmail.com> writes:
// --
module test;

import std.stdio;

void main()
{
     writeln("Hello World!");
}
// ---

dmd test.d -cov

..but no .lst file anywhere to be found. Huh! I don't get it.
Nov 11 2021
parent reply =?UTF-8?Q?Ali_=c3=87ehreli?= <acehreli yahoo.com> writes:
On 11/11/21 1:37 PM, forkit wrote:
 dmd test.d -cov
 
 ...but no .lst file anywhere to be found. Huh! I don't get it.
 
Please run the program! :) Ali
Nov 11 2021
parent reply forkit <forkit gmail.com> writes:
On Thursday, 11 November 2021 at 21:40:33 UTC, Ali Çehreli wrote:
 On 11/11/21 1:37 PM, forkit wrote:
 dmd test.d -cov
 
 ...but no .lst file anywhere to be found. Huh! I don't get it.
 
Please run the program! :) Ali
oh! that kinda makes sense, now that I think of it ;-)
Nov 11 2021
parent reply foxit <foxit gmail.com> writes:
On Thursday, 11 November 2021 at 22:35:21 UTC, forkit wrote:
 On Thursday, 11 November 2021 at 21:40:33 UTC, Ali Çehreli 
 wrote:
 On 11/11/21 1:37 PM, forkit wrote:
 dmd test.d -cov
 
 ...but no .lst file anywhere to be found. Huh! I don't get it.
 
Please run the program! :) Ali
oh! that kinda makes sense, now that I think of it ;-)
Actually, the reason I got soooooo confused is clear to me now. got so fed up with creating/saving files everytime I just wanted to play with some code. I can use 10 different languages in it...so far. Basically, my IDE means I never need to create/save files manually, I can just write|compile|run (although it has save/open feature too ;-) Unfortunately, it redirecs output of the .exe > somefile.txt (and my IDE reads that file back into a textbox within my IDE to display the results). I never see or use a command prompt). This redirection meant no .lst file was ever created, hence I could not find it. I spent an hour on this! Was so confusing. I know of no solution to this. Basically means I can't use my IDE when I use -cov .. back to the command prompt :-(
Nov 11 2021
parent reply Dr Machine Code <jckj33 gmail.com> writes:
On Thursday, 11 November 2021 at 23:51:42 UTC, foxit wrote:
 On Thursday, 11 November 2021 at 22:35:21 UTC, forkit wrote:
 [...]
Actually, the reason I got soooooo confused is clear to me now. I got so fed up with creating/saving files everytime I just wanted to play with some code. [...]
is your IDE more of a REPL thing?
Nov 12 2021
parent reply forkit <forkit gmail.com> writes:
On Friday, 12 November 2021 at 19:32:31 UTC, Dr Machine Code 
wrote:
 On Thursday, 11 November 2021 at 23:51:42 UTC, foxit wrote:
 On Thursday, 11 November 2021 at 22:35:21 UTC, forkit wrote:
 [...]
Actually, the reason I got soooooo confused is clear to me now. cause I got so fed up with creating/saving files everytime I just wanted to play with some code. [...]
is your IDE more of a REPL thing?
(developed in VS2010), that lets me quickly and easily write|compile|execute code in many languages without having to worry about first creating/saving files, or working at the command prompt. I call it EZ Compiler ;-) Here is a screen dump pic of it(not sure how long the link lasts though) https://imgur.com/a/PvBm2q4
Nov 12 2021
parent Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Friday, 12 November 2021 at 22:27:48 UTC, forkit wrote:
 On Friday, 12 November 2021 at 19:32:31 UTC, Dr Machine Code 
 wrote:
 On Thursday, 11 November 2021 at 23:51:42 UTC, foxit wrote:
 [...]
is your IDE more of a REPL thing?
(developed in VS2010), that lets me quickly and easily write|compile|execute code in many languages without having to worry about first creating/saving files, or working at the command prompt. I call it EZ Compiler ;-) Here is a screen dump pic of it(not sure how long the link lasts though) https://imgur.com/a/PvBm2q4
MD ![img](https://i.imgur.com/BKEQIzW.png)
Nov 12 2021