Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Filer::Read() test(Editing)
03-15-2018, 06:58 PM (This post was last modified: 03-15-2018 09:27 PM by qiracle.)
Post: #1
Filer::Read() test(Editing)
Overview

Filer::Read() test is used for testing run properly of Filer::Read(). Currently It will test Filer::Read(char *pDest) and Filer::Read(char *pDest, int64_t llBize).

Design:

Code:
defined ptzPfn and assign it  "./correctness_test/file"
defined buf[100]
Call Filer's constructor( Filer(const _TCHAR *sPfn) ) to initialize
Call Read(char *pDest) and get return value r1
Call Read(char *pDest, int64_t llBize) and get return value r2
if( r1 && r2 ){
   printf "passed"
}else{
   printf "failed"
}
Find all posts by this user
Quote this message in a reply
03-15-2018, 09:46 PM (This post was last modified: 03-15-2018 09:47 PM by xwcwt.)
Post: #2
RE: Filer::Read() test(Editing)
(03-15-2018 06:58 PM)jiangqiangqiang Wrote:  Overview

Filer::Read() test is used for testing run properly of Filer::Read(). Currently It will test Filer::Read(char *pDest) and Filer::Read(char *pDest, int64_t llBize).

Design:

Code:
defined ptzPfn and assign it  "./correctness_test/file"
defined buf[100]
Call Filer's constructor( Filer(const _TCHAR *sPfn) ) to initialize
Call Read(char *pDest) and get return value r1
Call Read(char *pDest, int64_t llBize) and get return value r2
if( r1 && r2 ){
   printf "passed"
}else{
   printf "failed"
}

I think the driving example is http://tab.d-thinker.org/showthread.php?...http://tab.d-thinker.org/showthread.php?tid=8184&pid=6705 and it says ' if it is instantiated with a dir'. please read more carefully.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: