On Mon, Mar 22, 2010 at 4:49 PM, Deva R <r.deva...@gmail.com> wrote:

> > I want to ask why it shows 1 success and 1 failure . there should be only
> 1
> > pass or 1 fail only . Do each test case have multiple sub-tests within
> them
> > ? > which class in source code finally decide whether it is pass or fail
> ? .
>
> Looks like some bookkeeping gone wrong..
> couldnt track how/why.. (file and source below)
>
> link:
> http://android.git.kernel.org/?p=platform/external/opencore.git;a=blob;f=engines/player/test/src/test_pv_player_engine.cpp;h=ad56cb89171ce09417fa7f35dd97b64fde029fa4;hb=5109388c810790f08bdf188b16a60c9020254296#l2155
>
> FILE: MYDROID
> \external\opencore\engines\player\test\src\test_pv_player_engine.cpp
>
> source:
> void pvplayer_engine_test::TestCompleted(test_case &tc)
> {
>    // Print out the result for this test case
>    const test_result the_result = tc.last_result();
>    fprintf(file, "Results for Test Case %d:\n", iCurrentTestNumber);
>    fprintf(file, "  Successes %d, Failures %d\n"
>            , the_result.success_count() - iTotalSuccess,
> the_result.failures().size() - iTotalFail);
>
>        fprintf(file, "the_result.success_count(%d) - iTotalSuccess (%d),
> the_result.failures().size(%d) iTotalFail(%d)"
>            , the_result.success_count(), iTotalSuccess,
> the_result.failures().size() ,iTotalFail);
>    fflush(file);
>
>
> This section of code is just printing  the final test result after
execution of test case .

In
(MYDROID)/external/opencore/engines/player/test/src/test_pv_player_engine.cpp.These
part of code
if (iCurrentTest)
         {
             OsclExecScheduler *sched = OsclExecScheduler::Current();
             if (sched)
            {
                 // Print out the test name
                 fprintf(file, "WWW = %s\n",
iCurrentTest->iTestCaseName.get_cstr());
               // Start the test
              iCurrentTest->StartTest();
              // Start the scheduler so the test case would run
#if USE_NATIVE_SCHEDULER
                // Have PV scheduler use the scheduler native to the system
                 sched->StartNativeScheduler();
 #else
                 // Have PV scheduler use its own implementation of the
scheduler
                sched->StartScheduler();
 #endif
             }

The iCurrentTest->StartTest() is actually runing the test case and that
calls somehow to
[(MYDROID)/external/opencore/oscl/unit_test/src/test_case.cpp]
test_case::run_subtests(void) , test_case::run_test(void) functions .

Can someone please tell me how a test case (for eg. class
pvplayer_async_test_newdelete : public pvplayer_async_test_base
) is calling these test case functions .

how 1 success and 1 failure being counted per test case ?

Thanks :
Uander

>
> On Mon, Mar 22, 2010 at 11:32 AM, Uander <uandro...@gmail.com> wrote:
> > Hi All ,
> >
> > Here is what I got while running a test case of open core .
> >
> > ***************
> > # pvplayer_engine_test -test 1 1
> > SDK Labeled: PVDEV_CORE_RELEASE_6.506.4.1 built on 20090312
> >
> > Test Program for pvPlayer engine class.
> >   Input file name 'test.mp4'
> >   Test case range 1 to 1
> >   Compressed output Video(No) Audio(No)
> >   Log level 8; Log node 0 Log Text 0 Log Mem 0
> >
> > Starting Test 1: Open-Play-Stop-Reset
> > Results for Test Case 1:
> >   Successes 1, Failures 1
> > Total Execution time for file test.mp4 is : 2.712000 seconds#
> > ***************
> >
> >
> > I want to ask why it shows 1 success and 1 failure . there should be only
> 1
> > pass or 1 fail only . Do each test case have multiple sub-tests within
> them
> > ?
> > which class in source code finally decide whether it is pass or fail ? .
> >
> > Thanks :
> > Uander
> >
> > --
> > unsubscribe: 
> > android-porting+unsubscr...@googlegroups.com<android-porting%2bunsubscr...@googlegroups.com>
> > website: http://groups.google.com/group/android-porting
> >
> > To unsubscribe from this group, send email to
> > android-porting+unsubscribegooglegroups.com or reply to this email with
> the
> > words "REMOVE ME" as the subject.
> >
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe from this group, send email to 
android-beginners+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to