Code-coverage - AS3 Classes: Date

ASSIGNED
Unassigned

Status

Tamarin
Tools
ASSIGNED
8 years ago
7 years ago

People

(Reporter: Chris Peyer, Unassigned)

Tracking

(Blocks: 1 bug)

unspecified
Q2 12 - Cyril
Bug Flags:
flashplayer-qrb +

Details

(Whiteboard: code-coverage)

Attachments

(2 attachments)

(Reporter)

Description

8 years ago
as of redux r5139:
                        covered      total        covered    total      
class                 functions  functions   pct     cond     cond   pct
Date                         58         61  95.1      163      191  85.3

Coverage of:
avmplus::Date::
avmplus::DateClass::
avmplus::DateObject::
Flags: flashplayer-qrb?

Updated

8 years ago
Assignee: nobody → dschaffe
Status: NEW → ASSIGNED
Target Milestone: --- → flash10.1.x-Salt

Updated

8 years ago
Flags: flashplayer-qrb? → flashplayer-qrb+

Updated

8 years ago
Target Milestone: flash10.1.x-Salt → flash10.2.x-Spicy

Updated

8 years ago
Assignee: dschaffe → brbaker

Updated

8 years ago
Target Milestone: flash10.2.x-Spicy → flash10.x - Serrano

Updated

8 years ago
Assignee: brbaker → dschaffe

Comment 1

8 years ago
From Date,DateClass,DateObject I get 84 functions and 417 conditions.  I think the difference is global functions within the Date.cpp file.  My results with patch are:
Class                                   Function Coverage           C/D Coverage
---------------------  ---------------------  ---------------------
avmplus::DateObject::      39 /    39 = 100%          8 /    10  =  80%
avmplus::DateClass::        6 /     6    = 100%         65 /    80 =  81%
avmplus::                           84 /    84 = 100%     345 /   417 =  82%
avmplus::Date::                14 /    14 = 100%       92 /   101 =  91%
---------------------  ---------------------  ---------------------
Total                                   84 /    84 = 100%     345 /   417 =  82%

Comment 2

8 years ago
Created attachment 485095 [details]
Testcase for Date construction

Testcase to cover conditions in:
avmplus::MakeDay()
avmplus::MakeTime()

Comment 3

8 years ago
Created attachment 485116 [details] [diff] [review]
new Date tests

merged Brent's constructor.as with new selftest for date.
Attachment #485116 - Flags: review?(brbaker)

Comment 4

8 years ago
Comment on attachment 485116 [details] [diff] [review]
new Date tests

// TEST: constructor with Date object
- Should test that the constructed date is actually the same as the passed in date instead of just !=NULL
d2->getTime()==d1->getTime()

// TEST: toStringInvalid
- Should verify that res==false, I assume this is the test that the formatIndex hits the default switch case which returns false.

// TEST: setDate negative values
- I don't see a code path in Date::setDate() that actually deals with negative values, this is just being passed into Date::MakeDay()

// TEST setDate NaN
- Do these overlap with as3/Date/constructor.as?

as3/Date/timezone.as
- The second test name is incorrect, it is not testing "test Date getTimezoneOffset" it is calling secondsUTC. Could this testcase also set the secondsUTC to some value that it is not already and confirm that it is set properly?
  * Currently d1 is already created with seconds==0, so maybe calling d1.secondsUTC=12, then you can test that d1.seconds==12 instead of just !=NULL, which it already was.
Attachment #485116 - Flags: review?(brbaker) → review-

Updated

7 years ago
Target Milestone: Q3 11 - Serrano → Q4 11 - Anza

Updated

7 years ago
Target Milestone: Q4 11 - Anza → Q1 12 - Brannan

Updated

7 years ago
Assignee: dschaffe → nobody
Target Milestone: Q1 12 - Brannan → Q2 12 - Cyril
You need to log in before you can comment on or make changes to this bug.