[Gambas-user] Integrate unittest component to Gambas

Christof Thalhofer chrisml at deganius.de
Mon May 14 10:02:59 CEST 2018


Am 14.05.2018 um 01:20 schrieb Adrien Prokopowicz:

> Considering the three proposed variations:
> 
> 1/ Assert.Equals("Hello", myString)
> 2/ Me.Equals("Hello", myString)
> 3/ Equals("Hello", myString)

> I still prefer the first one, mostly because what it does looks obvious 
> : even when not knowing exactly what's going on, I can tell I'm making 
> an assertion of equality. Having a common "Assert" base also makes all 
> assertions obvious by scanning through the code, which helps readability.

I do also, the term "Assert" ist common in unittesting:

Here "Assert.Something":

https://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.assert.aspx

Here "self.assertSomething"

https://docs.python.org/2/library/unittest.html

I personally like Adriens Idea with Assert.Something
but I also would like Me.AssertSomething (if the testclass inherits from
Unittest). But:

Assert.Something is much faster and easier to write while coding, you
can write

As<Tab>.So<Tab>

Instead of

AssertSo<Tab>

Sorry, Tobi and Adrien, I do not have really much time, we are creating
a building and there is much work to do here.

I think we first should build a main repo for it.


Alles Gute

Christof Thalhofer

-- 
Dies ist keine Signatur

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20180514/78637350/attachment.sig>


More information about the User mailing list