Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Generic test methods in the compact framework #327

Closed
CharliePoole opened this issue Nov 2, 2014 · 13 comments
Closed

Allow Generic test methods in the compact framework #327

CharliePoole opened this issue Nov 2, 2014 · 13 comments

Comments

@CharliePoole
Copy link
Contributor

Generic methods were not implemented in the compact framework build due to some differences in how they are implemented in CF. Essentially, it's not possible to work with open generic types in CF the way it is in the desktop versions of .NET. Consequently, a lot of what we do has to be done differently.

Neil has a build that includes generics, so I'll merge in his code with ours to get it to work.

@oznetmaster
Copy link
Contributor

Why did you remove the SimpleGenericMethod tests?

There were necessary changes to MsgUtils that were not included.

Everything else looks ok.

@CharliePoole
Copy link
Contributor Author

SimpleGenericMethod was an exact copy of GenericTestMethod tests.

I'll have to take a look at MsgUtils.
On Nov 12, 2014 12:42 AM, "oznetmaster" notifications@github.com wrote:

Why did you remove the SimpleGenericMethod tests?

There were necessary changes to MsgUtils that were not included.

Everything else looks ok.


Reply to this email directly or view it on GitHub
#327 (comment).

@oznetmaster
Copy link
Contributor

Shows how much I actually looked at each test :(

From: CharliePoole [mailto:notifications@github.com]
Sent: Wednesday, November 12, 2014 10:12 PM
To: nunit/nunit
Cc: oznetmaster
Subject: Re: [nunit] Allow Generic test methods in the compact framework (#327)

SimpleGenericMethod was an exact copy of GenericTestMethod tests.

I'll have to take a look at MsgUtils.
On Nov 12, 2014 12:42 AM, "oznetmaster" <notifications@github.com mailto:notifications@github.com > wrote:

Why did you remove the SimpleGenericMethod tests?

There were necessary changes to MsgUtils that were not included.

Everything else looks ok.


Reply to this email directly or view it on GitHub
#327 (comment).


Reply to this email directly or view it on GitHub #327 (comment) . https://github.com/notifications/beacon/AFh64fwyaiHXYeRwVYA7IQk0iIIsOxKJks5nM2IdgaJpZM4C2FOC.gif

@CharliePoole
Copy link
Contributor Author

MsgUtils had no impact on running generic tests, so I left it out of this PR.

It is in the next one, where I do miscellaneous cleanup. I almost left it out because I couldn't find anyplace the display of generic methods was called for in the framework, but I figured you must have some reason, so it's in.

@oznetmaster
Copy link
Contributor

Not an exact copy. SimpleGenericMethod has:

[TestFixture,Category("Generics")]

While GenericTestMethodTests has:

  [TestFixture]

Is Category not supported/desired any longer?

From: CharliePoole [mailto:notifications@github.com]
Sent: Wednesday, November 12, 2014 10:12 PM
To: nunit/nunit
Cc: oznetmaster
Subject: Re: [nunit] Allow Generic test methods in the compact framework (#327)

SimpleGenericMethod was an exact copy of GenericTestMethod tests.

I'll have to take a look at MsgUtils.
On Nov 12, 2014 12:42 AM, "oznetmaster" <notifications@github.com mailto:notifications@github.com > wrote:

Why did you remove the SimpleGenericMethod tests?

There were necessary changes to MsgUtils that were not included.

Everything else looks ok.


Reply to this email directly or view it on GitHub
#327 (comment).


Reply to this email directly or view it on GitHub #327 (comment) . https://github.com/notifications/beacon/AFh64fwyaiHXYeRwVYA7IQk0iIIsOxKJks5nM2IdgaJpZM4C2FOC.gif

@oznetmaster
Copy link
Contributor

I put that change into MsgUtil because I was getting an exception (ToString() not allowed on an open generic method) on the "return string.Format (Fmt_Defualt, val)". Obviously, that can only occur in the CF build.

I cannot remember exactly what tests caused it.

@CharliePoole
Copy link
Contributor Author

The duplication arose because I copied in a bunch of tests from both NUnit
and NunitLite. One of them just happened to have a Category defined.
On Nov 12, 2014 3:24 PM, "oznetmaster" notifications@github.com wrote:

Not an exact copy. SimpleGenericMethod has:

[TestFixture,Category("Generics")]

While GenericTestMethodTests has:

[TestFixture]

Is Category not supported/desired any longer?

From: CharliePoole [mailto:notifications@github.com]
Sent: Wednesday, November 12, 2014 10:12 PM
To: nunit/nunit
Cc: oznetmaster
Subject: Re: [nunit] Allow Generic test methods in the compact framework
(#327)

SimpleGenericMethod was an exact copy of GenericTestMethod tests.

I'll have to take a look at MsgUtils.
On Nov 12, 2014 12:42 AM, "oznetmaster" <notifications@github.com <mailto:
notifications@github.com> > wrote:

Why did you remove the SimpleGenericMethod tests?

There were necessary changes to MsgUtils that were not included.

Everything else looks ok.


Reply to this email directly or view it on GitHub
#327 (comment).


Reply to this email directly or view it on GitHub <
https://github.com/nunit/nunit/issues/327#issuecomment-62722704> . <
https://github.com/notifications/beacon/AFh64fwyaiHXYeRwVYA7IQk0iIIsOxKJks5nM2IdgaJpZM4C2FOC.gif>


Reply to this email directly or view it on GitHub
#327 (comment).

@CharliePoole
Copy link
Contributor Author

I see. Well it's in one of the pending merges.
On Nov 12, 2014 3:35 PM, "oznetmaster" notifications@github.com wrote:

I put that change into MsgUtil because I was getting an exception
(ToString() not allowed on an open generic method) on the "return
string.Format (Fmt_Defualt, val)". Obviously, that can only occur in the CF
build.

I cannot remember exactly what tests caused it.


Reply to this email directly or view it on GitHub
#327 (comment).

CharliePoole added a commit that referenced this issue Nov 14, 2014
Add generic support to CF build; fixes #327
@oznetmaster
Copy link
Contributor

So which is the preferred one to use? Is Category desirable?

From: CharliePoole [mailto:notifications@github.com]
Sent: Thursday, November 13, 2014 10:27 AM
To: nunit/nunit
Cc: oznetmaster
Subject: Re: [nunit] Allow Generic test methods in the compact framework (#327)

The duplication arose because I copied in a bunch of tests from both NUnit
and NunitLite. One of them just happened to have a Category defined.
On Nov 12, 2014 3:24 PM, "oznetmaster" <notifications@github.com mailto:notifications@github.com > wrote:

Not an exact copy. SimpleGenericMethod has:

[TestFixture,Category("Generics")]

While GenericTestMethodTests has:

[TestFixture]

Is Category not supported/desired any longer?

From: CharliePoole [mailto:notifications@github.com]
Sent: Wednesday, November 12, 2014 10:12 PM
To: nunit/nunit
Cc: oznetmaster
Subject: Re: [nunit] Allow Generic test methods in the compact framework
(#327)

SimpleGenericMethod was an exact copy of GenericTestMethod tests.

I'll have to take a look at MsgUtils.
On Nov 12, 2014 12:42 AM, "oznetmaster" <notifications@github.com mailto:notifications@github.com%20%3cmailto:%20%0b <mailto:
notifications@github.com mailto:notifications@github.com > > wrote:

Why did you remove the SimpleGenericMethod tests?

There were necessary changes to MsgUtils that were not included.

Everything else looks ok.


Reply to this email directly or view it on GitHub
#327 (comment).


Reply to this email directly or view it on GitHub <
https://github.com/nunit/nunit/issues/327#issuecomment-62722704> . <
https://github.com/notifications/beacon/AFh64fwyaiHXYeRwVYA7IQk0iIIsOxKJks5nM2IdgaJpZM4C2FOC.gif>


Reply to this email directly or view it on GitHub
#327 (comment).


Reply to this email directly or view it on GitHub #327 (comment) . https://github.com/notifications/beacon/AFh64QHCwFE5VlavAy_WUxFT91lMVPs4ks5nNA5sgaJpZM4C2FOC.gif

@CharliePoole
Copy link
Contributor Author

Since it doesn't affect the tests, it was a coin toss. I used the class whose name I liked better.

@oznetmaster
Copy link
Contributor

It does affect the tests if one wants to select tests by category.

From: CharliePoole [mailto:notifications@github.com]
Sent: Friday, November 21, 2014 6:40 AM
To: nunit/nunit
Cc: oznetmaster
Subject: Re: [nunit] Allow Generic test methods in the compact framework (#327)

Since it doesn't affect the tests, it was a coin toss. I used the class whose name I liked better.


Reply to this email directly or view it on GitHub #327 (comment) . https://github.com/notifications/beacon/AFh64Y1MxvzjfrWwjKM_pPlVqzXBPAf0ks5nPmUwgaJpZM4C2FOC.gif

@CharliePoole
Copy link
Contributor Author

As I said, it was a one-time adhoc thing for manual testing in the Gui. Not
important. When we get to the 3.0 gui, you'll see things like this pop up
from time to time in the tests because somebody wanted to see how a
particular attribute showed up in the gui.

On Thu, Nov 20, 2014 at 2:48 PM, oznetmaster notifications@github.com
wrote:

It does affect the tests if one wants to select tests by category.

From: CharliePoole [mailto:notifications@github.com]
Sent: Friday, November 21, 2014 6:40 AM
To: nunit/nunit
Cc: oznetmaster
Subject: Re: [nunit] Allow Generic test methods in the compact framework
(#327)

Since it doesn't affect the tests, it was a coin toss. I used the class
whose name I liked better.


Reply to this email directly or view it on GitHub <
https://github.com/nunit/nunit/issues/327#issuecomment-63893401> . <
https://github.com/notifications/beacon/AFh64Y1MxvzjfrWwjKM_pPlVqzXBPAf0ks5nPmUwgaJpZM4C2FOC.gif>


Reply to this email directly or view it on GitHub
#327 (comment).

@oznetmaster
Copy link
Contributor

I use categories in my testing all the time (my GUI supports them). I thought everyone did.

From: CharliePoole [mailto:notifications@github.com]
Sent: Friday, November 21, 2014 7:35 AM
To: nunit/nunit
Cc: oznetmaster
Subject: Re: [nunit] Allow Generic test methods in the compact framework (#327)

As I said, it was a one-time adhoc thing for manual testing in the Gui. Not
important. When we get to the 3.0 gui, you'll see things like this pop up
from time to time in the tests because somebody wanted to see how a
particular attribute showed up in the gui.

On Thu, Nov 20, 2014 at 2:48 PM, oznetmaster <notifications@github.com mailto:notifications@github.com >
wrote:

It does affect the tests if one wants to select tests by category.

From: CharliePoole [mailto:notifications@github.com]
Sent: Friday, November 21, 2014 6:40 AM
To: nunit/nunit
Cc: oznetmaster
Subject: Re: [nunit] Allow Generic test methods in the compact framework
(#327)

Since it doesn't affect the tests, it was a coin toss. I used the class
whose name I liked better.


Reply to this email directly or view it on GitHub <
https://github.com/nunit/nunit/issues/327#issuecomment-63893401> . <
https://github.com/notifications/beacon/AFh64Y1MxvzjfrWwjKM_pPlVqzXBPAf0ks5nPmUwgaJpZM4C2FOC.gif>


Reply to this email directly or view it on GitHub
#327 (comment).


Reply to this email directly or view it on GitHub #327 (comment) . https://github.com/notifications/beacon/AFh64afZiaoNGMOzAQ2phR_IuUpsrl65ks5nPnIRgaJpZM4C2FOC.gif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants