This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 79214 - Generating of skeleton must treat assert carefully
Summary: Generating of skeleton must treat assert carefully
Status: RESOLVED WONTFIX
Alias: None
Product: javame
Classification: Unclassified
Component: JUnit (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jiri Prazak
URL:
Keywords:
Depends on:
Blocks: 77184
  Show dependency tree
 
Reported: 2006-06-27 14:34 UTC by Lukas Hasik
Modified: 2007-06-14 15:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Hasik 2006-06-27 14:34:20 UTC
jars 0627
-there is only assertEquals(long, long) and assertEquals(Object, Object) in
j2meunit framework

-it cannot generate assertEquals(boolean, boolean)... the generating must be
more 'smart'
Comment 1 Lukas Hasik 2006-06-27 14:54:24 UTC
possible solutions:
for boolean : public void assertTrue(boolean condition)
for float, double : public void assertTrue(boolean condition), condition =
(expectedResult==result)
Comment 2 Jiri Prazak 2006-06-30 13:38:01 UTC
fixed.  when return type is float, double or boolean 

AssertTrue(expectedResult==result)

is used instead.  If there are any other primitive types this should be used for
please let me know.
Comment 3 Lukas Hasik 2006-07-12 15:36:58 UTC
verified in 5.5 build 060711 buils (Beta2 candidate)
Comment 4 Lukas Hasik 2006-08-08 16:58:01 UTC
there are methods assertEquals(boolean, boolean), assertEquals(double, double),
assertEquals(float, float) in JMUnit for CLDC1.1 

It would be useful to generate these calls for CLDC1.1
Comment 5 Lukas Hasik 2006-08-08 17:03:28 UTC
it's not so easy... There can be different configurations on different CLDC
version. It's probably better to keep it as it is. 

Or we should generate code with preprocessor blocks.

Decreasing priority and going to fill enhancement.
Comment 6 Jiri Prazak 2006-08-08 18:06:30 UTC
Correct.

Basically what would happen is that this would have to be hooked up to
configuration management and I would have to create preprocessor code that would
switch back an forth.  This is an overkill for test generation since this does
exactly the same thing as is and works on everything.

If there are requests for this feature from the user community, and there are
more than just from a handful of users, I might look into doing this in the future.