Thread overview | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
July 16, 2008 unit testing | ||||
---|---|---|---|---|
| ||||
Can anyone explain to me the proper way to put a unittest { ... } block into my code so that the only time unit tests get compiled and run is if I'm in a release mode? I thought that I could simply compile with: dmd -release mymodule.d However, when I run the resulting executable the unit tests are getting executed. I can wrap the unittest { ... } block in a debug { ... } block, but is this really the best way? Thanks for the help |
July 16, 2008 Re: unit testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to sleek | Sorry, it seems that the dmd is not the problem here. In fact, what was being executed was the following: dsss build mymodule.d -release This seems to be compiling unit tests in all the time. I'm not sure why. Can anyone help with this? "sleek" <cslush@gmail.com> wrote in message news:g5jmrt$eaf$1@digitalmars.com... > Can anyone explain to me the proper way to put a unittest { ... } block into my code so that the only time unit tests get compiled and run is if I'm in a release mode? > > I thought that I could simply compile with: > > dmd -release mymodule.d > > However, when I run the resulting executable the unit tests are getting executed. I can wrap the unittest { ... } block in a debug { ... } block, but is this really the best way? > > Thanks for the help > |
July 16, 2008 Re: unit testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to sleek | "sleek" <cslush@gmail.com> wrote in message news:g5jo61$h1m$1@digitalmars.com... > Sorry, it seems that the dmd is not the problem here. In fact, what was being executed was the following: > > dsss build mymodule.d -release > > This seems to be compiling unit tests in all the time. I'm not sure why. Can anyone help with this? > Does your dsss.conf file have the -unittest flag in it? If so, that's why. |
July 20, 2008 Re: unit testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | I discovered this to be user error. I didn't realize that dsss was creating a "dsss_objs" folder. For whatever reason, I couldn't simply do a "dsss build mymodule.d" and have it cleanly create a new instance. I guess I need to do a "dsss clean" before rebuilding. Thanks for the help Jarret "Jarrett Billingsley" <kb3ctd2@yahoo.com> wrote in message news:g5kqsl$313f$1@digitalmars.com... > "sleek" <cslush@gmail.com> wrote in message news:g5jo61$h1m$1@digitalmars.com... >> Sorry, it seems that the dmd is not the problem here. In fact, what was being executed was the following: >> >> dsss build mymodule.d -release >> >> This seems to be compiling unit tests in all the time. I'm not sure why. Can anyone help with this? >> > > Does your dsss.conf file have the -unittest flag in it? If so, that's why. > |
July 20, 2008 Re: unit testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to sleek | "sleek" <cslush@gmail.com> wrote in message news:g5u57t$1i6n$1@digitalmars.com... >I discovered this to be user error. I didn't realize that dsss was creating a "dsss_objs" folder. For whatever reason, I couldn't simply do a "dsss build mymodule.d" and have it cleanly create a new instance. I guess I need to do a "dsss clean" before rebuilding. Thanks for the help Jarret Alternatively, you can do "dsss build -full mymodule.d". That forces a full rebuild. And it's Jarrett with two Ts. |
July 20, 2008 Re: unit testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | "Jarrett Billingsley" <kb3ctd2@yahoo.com> wrote in message news:g5ufre$264o$1@digitalmars.com... > "sleek" <cslush@gmail.com> wrote in message news:g5u57t$1i6n$1@digitalmars.com... >>I discovered this to be user error. I didn't realize that dsss was creating a "dsss_objs" folder. For whatever reason, I couldn't simply do a "dsss build mymodule.d" and have it cleanly create a new instance. I guess I need to do a "dsss clean" before rebuilding. Thanks for the help Jarret > > Alternatively, you can do "dsss build -full mymodule.d". That forces a full rebuild. > > And it's Jarrett with two Ts. And everyone, I mean *everyone* misspells it the wrong way. It's like a conspiracy. |
July 20, 2008 Re: unit testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | On Sun, 20 Jul 2008 08:44:54 +0400, Jarrett Billingsley <kb3ctd2@yahoo.com> wrote:
> And everyone, I mean *everyone* misspells it the wrong way. It's like a
> conspiracy.
Don't pay attention to that, Jarett :)
|
July 20, 2008 Re: unit testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | On Sun, Jul 20, 2008 at 6:44 AM, Jarret Billingsley <kb3ctd2@yahoo.com> wrote: > "Jarret Billingsley" <kb3ctd2@yahoo.com> wrote in message news:g5ufre$264o$1@digitalmars.com... >> "sleek" <cslush@gmail.com> wrote in message news:g5u57t$1i6n$1@digitalmars.com... >>>I discovered this to be user error. I didn't realize that dsss was creating a "dsss_objs" folder. For whatever reason, I couldn't simply do a "dsss build mymodule.d" and have it cleanly create a new instance. I guess I need to do a "dsss clean" before rebuilding. Thanks for the help Jarrett >> >> Alternatively, you can do "dsss build -full mymodule.d". That forces a full rebuild. >> >> And it's Jarret with one T. > > And everyone, I mean *everyone* misspells it the wrong way. It's like a conspiracy. > > > Don't worry, at least I know how to spell your name, Jarret! -- Anders |
July 22, 2008 Re: unit testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | Jarrett Billingsley wrote:
> "Jarrett Billingsley" <kb3ctd2@yahoo.com> wrote in message news:g5ufre$264o$1@digitalmars.com...
>> "sleek" <cslush@gmail.com> wrote in message news:g5u57t$1i6n$1@digitalmars.com...
>>> I discovered this to be user error. I didn't realize that dsss was creating a "dsss_objs" folder. For whatever reason, I couldn't simply do a "dsss build mymodule.d" and have it cleanly create a new instance. I guess I need to do a "dsss clean" before rebuilding. Thanks for the help Jarret
>> Alternatively, you can do "dsss build -full mymodule.d". That forces a full rebuild.
>>
>> And it's Jarrett with two Ts.
>
> And everyone, I mean *everyone* misspells it the wrong way. It's like a conspiracy.
>
>
You should see what happens to my surname. I have a list of more than 200 different ways that people have got it wrong. Including several on official documents.
|
July 22, 2008 Re: unit testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don | "Don" <nospam@nospam.com.au> wrote in message news:g64mge$200f$1@digitalmars.com... > Jarrett Billingsley wrote: >> "Jarrett Billingsley" <kb3ctd2@yahoo.com> wrote in message news:g5ufre$264o$1@digitalmars.com... >>> "sleek" <cslush@gmail.com> wrote in message news:g5u57t$1i6n$1@digitalmars.com... >>>> I discovered this to be user error. I didn't realize that dsss was creating a "dsss_objs" folder. For whatever reason, I couldn't simply do a "dsss build mymodule.d" and have it cleanly create a new instance. I guess I need to do a "dsss clean" before rebuilding. Thanks for the help Jarret >>> Alternatively, you can do "dsss build -full mymodule.d". That forces a full rebuild. >>> >>> And it's Jarrett with two Ts. >> >> And everyone, I mean *everyone* misspells it the wrong way. It's like a conspiracy. > You should see what happens to my surname. I have a list of more than 200 different ways that people have got it wrong. Including several on official documents. Wow, I get my last name misspelled too but not quite that diversely. You wouldn't think "Clugston" would give people that much trouble. |
Copyright © 1999-2021 by the D Language Foundation