锘??xml version="1.0" encoding="utf-8" standalone="yes"?>91久久精品日日躁夜夜躁国产,国产日韩精品一区,一区二区三区在线观看欧美http://www.shnenglu.com/volant/category/10539.htmlzh-cnFri, 16 Aug 2013 17:29:18 GMTFri, 16 Aug 2013 17:29:18 GMT60regex鈥斺旀鍒欒〃杈懼紡涓嬌鐢ㄦ柟鎷彿http://www.shnenglu.com/volant/archive/2010/04/12/112314.html灝忓灝忓Mon, 12 Apr 2010 05:14:00 GMThttp://www.shnenglu.com/volant/archive/2010/04/12/112314.htmlhttp://www.shnenglu.com/volant/comments/112314.htmlhttp://www.shnenglu.com/volant/archive/2010/04/12/112314.html#Feedback0http://www.shnenglu.com/volant/comments/commentRss/112314.htmlhttp://www.shnenglu.com/volant/services/trackbacks/112314.html宸ヤ綔涓粡甯擱渶瑕佸湪姝e垯琛ㄨ揪寮忎腑浣跨敤鏂規嫭鍙鳳紝姣斿鍖歸厤Linux緋葷粺鍛戒護琛屾彁紺虹“[root@localhost ~]# ”銆傚湪python涓紝鍙互浣跨敤姝e垯琛ㄨ揪寮?#8220;[\[][^\[\]]*[\]][#|$] ”榪涜鍖歸厤錛屼絾鍦╮egex涓姝e垯琛ㄨ揪寮忔棤娉曟紜尮閰嶃?br>鐢變簬man鎵嬪唽涓己灝戝鏂規嫭鍙瘋漿涔夌殑浠嬬粛錛屾湰鏂囧regex涓柟鎷彿鐨勪嬌鐢ㄨ繘琛屾祴璇曪紝嫻嬭瘯紼嬪簭濡備笅錛?/p>
#include <stdio.h>
#include 
<string.h>

#include 
<sys/types.h>
#include 
<regex.h>

int main(int argc, char** argv)
{
        
char * pattern, *mstr;
        
int x, z, lno = 0, cflags = REG_EXTENDED;
        
char ebuf[128], lbuf[256], format[32];
        regex_t reg;
        regmatch_t pm[
10];
        
const size_t nmatch = 10;

        pattern 
= argv[1];
        z 
= regcomp(&reg, pattern, cflags);

        
if (z != 0)
        
{
                regerror(z, 
&reg, ebuf, sizeof(ebuf));
                fprintf(stderr, 
"%s: pattern '%s' \n",ebuf, pattern);
                regfree(
&reg);
                
return 1;
        }


        
while(fgets(lbuf, sizeof(lbuf), stdin))
        
{
                
++lno;
                
if ((z = strlen(lbuf)) > 0 && lbuf[z-1]== '\n') lbuf[z - 1= 0;

                z 
= regexec(&reg, lbuf, nmatch, pm, 0);
                
if (z == REG_NOMATCH)
                
{
                        printf(
"not match\n");
                        
continue;
                }

                
else if (z != 0)
                
{
                        regerror(z, 
&reg, ebuf, sizeof(ebuf));
                        fprintf(stderr, 
"%s: regcom('%s')\n",
                                        ebuf, lbuf);
                        
return 2;
                }


                
if (pm[0].rm_so!=-1)
                        printf(
"%04d: %s\n", lno, lbuf);
                
for (x = 0; x < nmatch && pm[x].rm_so != -1++ x)
                
{
                        mstr 
= strndup(lbuf + pm[x].rm_so, pm[x].rm_eo-pm[x].rm_so);
                        printf(
" $%d: %s\n", x, mstr);
                        free(mstr);
                }

                fflush(stdout);

        }


        regfree(
&reg);
        
return 0;
}
涓嬮潰鏄姝e垯琛ㄨ揪寮?#8220;[\[][^\[\]]*[\]][#|$] ” 鐨勬祴璇曪紝鏄劇劧涓嶇鍚堣姹傘?
./testreg "[\[][^\[\]]*[\]][#|$] "  
[root@localhost bin]# 
not match
[a\]# 
0005: [a\]# 
 $
0: [a\]# 
浠庣畝鍗曠殑寮濮嬪厛嫻嬭瘯宸︽嫭鍙?#8220;[”鐨勫尮閰嶏細
./testreg "[\[]+"
a
not match
[
0002: [
 $
0: [
[root@localhost bin]# 
0003: [root@localhost bin]# 
 $
0: [
鍐嶆祴璇曞彸鎷彿“]”錛?
./testreg "[\]]+"
]
not match
\]  
0002: \]
 $
0: \]
-----------------
.
/testreg "[]]+"
]]
0001: ]]
 $
0: ]]
涓や釜綆鍗曠殑姝e垯琛ㄨ揪寮忓彲浠ョ湅鍑猴細regex涓乏鏂規嫭鍙烽渶瑕佽漿涔夛紝鍙蟲柟鎷彿涓嶉渶瑕佽漿涔夈?br>涓嬮潰鎴戜滑鍐嶆潵嫻嬭瘯鍖歸厤涓涓嬩換鎰忛潪鏂規嫭鍙峰瓧絎︼細
./testreg "[^\[]]+" //瀵筟杞箟錛屼笉瀵筣杞箟
[abc]
0001: [abc]
 $
0: c]
.
/testreg "[^\[\]]+" //瀵筟鍜宂杞箟
[abc]
0001: [abc]
 $
0: c]
.
/testreg "[^]\[]+" //瀵筟杞箟錛屼笉瀵筣杞箟錛屼笖鎶奭鏀懼湪^鍚庝嬌]涓嶄笌鍓嶉潰鐨刐鍖歸厤
[abc]
0001: [abc]
 $
0: abc
閫氳繃涓婇潰嫻嬭瘯鍙互寰楀嚭姝g‘鐨勬鍒欒〃杈懼紡鏉ュ尮閰峀inux鍛戒護琛屾彁紺虹鈥斺?#8220;[\[][^]\[]*[]][#$] ”鎴?#8220;\[[^]\[]*][#$] ”銆?

灝忓 2010-04-12 13:14 鍙戣〃璇勮
]]>
[瀵煎叆]鏍囧噯C鍑芥暟錛歴trncpyhttp://www.shnenglu.com/volant/archive/2009/06/18/87973.html灝忓灝忓Thu, 18 Jun 2009 06:38:00 GMThttp://www.shnenglu.com/volant/archive/2009/06/18/87973.htmlhttp://www.shnenglu.com/volant/comments/87973.htmlhttp://www.shnenglu.com/volant/archive/2009/06/18/87973.html#Feedback0http://www.shnenglu.com/volant/comments/commentRss/87973.htmlhttp://www.shnenglu.com/volant/services/trackbacks/87973.html
鏂囩珷鏉ユ簮:http://blog.csdn.net/volant_hoo/archive/2009/05/11/4167919.aspx

灝忓 2009-06-18 14:38 鍙戣〃璇勮
]]>
[瀵煎叆]GCC C璇█鎵╁睍錛?錛?/title><link>http://www.shnenglu.com/volant/archive/2009/06/18/87972.html</link><dc:creator>灝忓</dc:creator><author>灝忓</author><pubDate>Thu, 18 Jun 2009 06:38:00 GMT</pubDate><guid>http://www.shnenglu.com/volant/archive/2009/06/18/87972.html</guid><wfw:comment>http://www.shnenglu.com/volant/comments/87972.html</wfw:comment><comments>http://www.shnenglu.com/volant/archive/2009/06/18/87972.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/volant/comments/commentRss/87972.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/volant/services/trackbacks/87972.html</trackback:ping><description><![CDATA[ 鐪嬪紑婧愮殑浠g爜涓彂鐜頒簡涓浜涢潤鎬佸嚱鏁板0鏄庡悗鏈夊涓嬪唴瀹癸細__attribute__ ((constructor))榪欐槸gcc鐨勬墿灞曞睘鎬с?img src="http://blog.csdn.net/volant_hoo/aggbug/4169081.aspx" width="1" height="1"><br>鏂囩珷鏉ユ簮:<a >http://blog.csdn.net/volant_hoo/archive/2009/05/11/4169081.aspx</a><img src ="http://www.shnenglu.com/volant/aggbug/87972.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/volant/" target="_blank">灝忓</a> 2009-06-18 14:38 <a href="http://www.shnenglu.com/volant/archive/2009/06/18/87972.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[瀵煎叆]浠庝竴鍒伴潰璇曢璋堣搗http://www.shnenglu.com/volant/archive/2009/06/18/87970.html灝忓灝忓Thu, 18 Jun 2009 06:38:00 GMThttp://www.shnenglu.com/volant/archive/2009/06/18/87970.htmlhttp://www.shnenglu.com/volant/comments/87970.htmlhttp://www.shnenglu.com/volant/archive/2009/06/18/87970.html#Feedback0http://www.shnenglu.com/volant/comments/commentRss/87970.htmlhttp://www.shnenglu.com/volant/services/trackbacks/87970.html
鏂囩珷鏉ユ簮:http://blog.csdn.net/volant_hoo/archive/2009/05/11/4169108.aspx

灝忓 2009-06-18 14:38 鍙戣〃璇勮
]]>
[瀵煎叆]鍏變韓鍐呭瓨http://www.shnenglu.com/volant/archive/2009/06/18/87971.html灝忓灝忓Thu, 18 Jun 2009 06:38:00 GMThttp://www.shnenglu.com/volant/archive/2009/06/18/87971.htmlhttp://www.shnenglu.com/volant/comments/87971.htmlhttp://www.shnenglu.com/volant/archive/2009/06/18/87971.html#Feedback0http://www.shnenglu.com/volant/comments/commentRss/87971.htmlhttp://www.shnenglu.com/volant/services/trackbacks/87971.html
鏂囩珷鏉ユ簮:http://blog.csdn.net/volant_hoo/archive/2009/05/11/4169093.aspx

灝忓 2009-06-18 14:38 鍙戣〃璇勮
]]>
gtest鐨勪竴涓畝鍗曟墿灞曪紙榪愯鏃墮棿嫻嬭瘯錛夌殑瀹炰緥http://www.shnenglu.com/volant/archive/2008/08/27/60203.html灝忓灝忓Wed, 27 Aug 2008 15:34:00 GMThttp://www.shnenglu.com/volant/archive/2008/08/27/60203.htmlhttp://www.shnenglu.com/volant/comments/60203.htmlhttp://www.shnenglu.com/volant/archive/2008/08/27/60203.html#Feedback0http://www.shnenglu.com/volant/comments/commentRss/60203.htmlhttp://www.shnenglu.com/volant/services/trackbacks/60203.html涓婁竴綃囦腑瀵筭test榪涜浜嗕竴涓畝鍗曠殑鎵╁睍錛屾湰鏂囬氳繃瀹炰緥嫻嬭瘯騫朵粙緇嶈繖涓墿灞曠殑鐢ㄦ硶銆?/p>

棣栧厛瀹炵幇涓や釜Fibonacci鍑芥暟錛岀劧鍚庡榪欎袱涓嚱鏁拌繘琛屾祴璇曪細

Fibonacci_1錛屼嬌鐢ㄥ驚鐜疄鐜幫細

unsigned int Fibonacci_1(unsigned int n)
{
    unsigned 
int i;
    unsigned 
int f0 = 1, f1 = 1, f2;
    
for (i = 1; i < n; i++)
    
{
        f2 
= f0 + f1;
        f0 
= f1;
        f1 
= f2;
    }

    
return f1;
}


Fibonacci_2錛屼嬌鐢ㄩ掑綊瀹炵幇錛?/p>

unsigned int Fibonacci_2(unsigned int n)
{
    
switch (n)
    
{
        
case 0:
            
return 1;
        
case 1:
            
return 1;
        
default:
            
return Fibonacci_2(n - 1+ Fibonacci_2(n - 2);
    }

}


嫻嬭瘯鐢ㄤ緥錛?/p>

TEST_T(Fibonacci_Recursive, 30)
{
    Fibonacci_2(
30);
    ASSERT_TIME(
0.1);
}


TEST_T(Fibonacci_Loop, 
30)
{
    Fibonacci_1(
30);
    ASSERT_TIME(
0.1);
}


TEST_T(Fibonacci_Recursive, 
40)
{
    TEST_T_SHOWTIME();
    Fibonacci_2(
40);
    EXCEPT_TIME(
0.1);
    ASSERT_TIME(
1<< "\nUsed too long time!";
}


TEST_T(Fibonacci_Loop, 
40)
{
    TEST_T_SHOWTIME();
    Fibonacci_1(
40);
    EXCEPT_TIME(
0.1);
    ASSERT_TIME(
1<< "\nUsed too long time!";
}


嫻嬭瘯緇撴灉錛?/p>

 

[==========] Running 4 tests from 2 test cases.
[
----------] Global test environment set-up.
[
----------2 tests from TIME_Fibonacci_Recursive
[ RUN      ] TIME_Fibonacci_Recursive.
30
[       OK ] TIME_Fibonacci_Recursive.
30
[ RUN      ] TIME_Fibonacci_Recursive.
40
FibonacciTest.cpp:
47: Failure
Failed
Time: running 
2.9995(s) > 0.1(s)
FibonacciTest.cpp:
48: Failure
Failed
Time: running 
2.9995(s) > 1(s)
Used too 
long time!
[   TIME   ] used time: 
2.9995(s)
[  FAILED  ] TIME_Fibonacci_Recursive.
40
[
----------2 tests from TIME_Fibonacci_Loop
[ RUN      ] TIME_Fibonacci_Loop.
30
[       OK ] TIME_Fibonacci_Loop.
30
[ RUN      ] TIME_Fibonacci_Loop.
40
[   TIME   ] used time: 
0(s)
[       OK ] TIME_Fibonacci_Loop.
40
[
----------] Global test environment tear-down
[
==========4 tests from 2 test cases ran.
[  PASSED  ] 
3 tests.
[  FAILED  ] 
1 test, listed below:
[  FAILED  ] TIME_Fibonacci_Recursive.
40

 

瀹炰緥涓祴璇曚簡鍥涗釜嫻嬭瘯鐢ㄤ緥錛屽垎鍒祴璇曚簡涓や釜鍑芥暟鍒嗗埆璁$畻Fibonacci(30)鍜孎ibonacci(40)鎵鑺辮垂鐨勬椂闂淬傛祴璇曠敤渚?銆?姣旇緝綆鍗曪紝浠呮湁涓涓狝SSERT_TIME鏂█鐢ㄤ簬嫻嬭瘯榪愯鍒版璇ユ祴璇曠敤渚嬭姳璐圭殑鏃墮棿銆傛祴璇曠敤渚?銆?錛屽鍔犱簡涓ゆ潯璇彞錛歍EST_T_SHOWTIME()錛屾祴璇曠敤渚嬬粨鏉熷悗鎵撳嵃鎵ц鏃墮棿錛汦XCEPT_TIME鏂█錛岃繖閲屽彧鏄祴璇曚互涓婨XCEPT_TIME鍜孉SSERT_TIME鐨勫尯鍒紝鍓嶈呯戶緇墽琛屽悗緇鍙ワ紝鍚庤呭垯緇撴潫褰撳墠鐨勬祴璇曠敤渚嬨?img src ="http://www.shnenglu.com/volant/aggbug/60203.html" width = "1" height = "1" />

灝忓 2008-08-27 23:34 鍙戣〃璇勮
]]>
gtest鐨勪竴涓畝鍗曟墿灞?/title><link>http://www.shnenglu.com/volant/archive/2008/08/27/60201.html</link><dc:creator>灝忓</dc:creator><author>灝忓</author><pubDate>Wed, 27 Aug 2008 15:14:00 GMT</pubDate><guid>http://www.shnenglu.com/volant/archive/2008/08/27/60201.html</guid><wfw:comment>http://www.shnenglu.com/volant/comments/60201.html</wfw:comment><comments>http://www.shnenglu.com/volant/archive/2008/08/27/60201.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/volant/comments/commentRss/60201.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/volant/services/trackbacks/60201.html</trackback:ping><description><![CDATA[<p>鐪嬩簡gtest鐨勪竴涓猻imple錛屽叾涓湁嫻嬭瘯榪愯鏃墮棿鐨勬柟娉曪紝浣嗕嬌鐢ㄨ搗鏉ョ◢寰礋璐o紝鍥犳鍋氫簡涓涓畝鍗曠殑鎵╁睍銆?/p> <p>鎵╁睍鍐呭錛?br />1. TEST_T(test_case_name, test_name)錛岀敤浜庡畾涔夎繍琛屾椂闂存祴璇曠敤渚嬨?br />2. TEST_T_SHOWTIME()錛屾墦寮鎵撳嵃嫻嬭瘯鐢ㄤ緥榪愯鏃墮棿鎵撳嵃寮鍏熾?br />3. EXCEPT_TIME(second)鍜孉SSERT_TIME(second)錛屾柇璦錛宻econd涓篸ouble綾誨瀷錛屾祴璇曡繍琛屾椂闂存槸鍚﹀皬浜巗econd銆?/p> <p>浣跨敤璇存槑錛?br />鍚戞甯鎬嬌鐢ㄤ竴鏍鳳紝鍙槸鍦ㄩ渶瑕佹椂闂存祴璇曟椂include “gtest_e.h”鍗沖彲錛屽綋鐒朵篃寰楁妸鐩稿簲鐨勫簱閾炬帴鍒版墽琛屾枃浠朵腑銆?/p> <p>鍏蜂綋瀹炵幇錛?br />婧愭枃浠秅test_e.h----</p> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img id="Codehighlighter1_0_19_Open_Image" onclick="this.style.display='none'; Codehighlighter1_0_19_Open_Text.style.display='none'; Codehighlighter1_0_19_Closed_Image.style.display='inline'; Codehighlighter1_0_19_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_0_19_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_0_19_Closed_Text.style.display='none'; Codehighlighter1_0_19_Open_Image.style.display='inline'; Codehighlighter1_0_19_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"><span id="Codehighlighter1_0_19_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff">/**/</span><span id="Codehighlighter1_0_19_Open_Text"><span style="color: #008000">/*</span><span style="color: #008000">*<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" /> * gtest_e.h<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" /> </span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" />#ifndef GTEST_E_H_<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">#define</span><span style="color: #000000"> GTEST_E_H_</span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" />#include </span><span style="color: #000000">"</span><span style="color: #000000">gtest_time.h</span><span style="color: #000000">"</span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">#define</span><span style="color: #000000"> TEST_T(test_case_name, test_name)\</span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" />    GTEST_TEST(TIME_##test_case_name, test_name, ::TimeTest)<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">#define</span><span style="color: #000000"> TEST_T_SHOWTIME() TimeTest_setShowFlag(1)</span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">#define</span><span style="color: #000000"> ASSERT_TIME(time) if(TimeTest_setTimePoint() - time > 0) \</span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" />    FAIL() </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Time: running </span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000"><<</span><span style="color: #000000"> TimeTest_getTime() </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">(s) > </span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000"><<</span><span style="color: #000000"> time </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">(s)</span><span style="color: #000000">"</span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">#define</span><span style="color: #000000"> EXCEPT_TIME(time) if(TimeTest_setTimePoint() - time > 0) \</span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" />    ADD_FAILURE() </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Time: running </span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000"><<</span><span style="color: #000000"> TimeTest_getTime() </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">(s) > </span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000"><<</span><span style="color: #000000"> time </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">(s)</span><span style="color: #000000">"</span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">#endif</span><span style="color: #000000"> /* GTEST_E_H_ */</span></div> 婧愭枃浠秅test_time.h----<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img id="Codehighlighter1_0_22_Open_Image" onclick="this.style.display='none'; Codehighlighter1_0_22_Open_Text.style.display='none'; Codehighlighter1_0_22_Closed_Image.style.display='inline'; Codehighlighter1_0_22_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_0_22_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_0_22_Closed_Text.style.display='none'; Codehighlighter1_0_22_Open_Image.style.display='inline'; Codehighlighter1_0_22_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"><span id="Codehighlighter1_0_22_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff">/**/</span><span id="Codehighlighter1_0_22_Open_Text"><span style="color: #008000">/*</span><span style="color: #008000">*<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" /> * gtest_time.h<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" /> </span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" />#ifndef GTEST_TIME_H_<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">#define</span><span style="color: #000000"> GTEST_TIME_H_</span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" />#include </span><span style="color: #000000"><</span><span style="color: #000000">gtest</span><span style="color: #000000">/</span><span style="color: #000000">gtest.h</span><span style="color: #000000">></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> TimeTest: </span><span style="color: #0000ff">public</span><span style="color: #000000"> testing::Test<br /><img id="Codehighlighter1_133_490_Open_Image" onclick="this.style.display='none'; Codehighlighter1_133_490_Open_Text.style.display='none'; Codehighlighter1_133_490_Closed_Image.style.display='inline'; Codehighlighter1_133_490_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_133_490_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_133_490_Closed_Text.style.display='none'; Codehighlighter1_133_490_Open_Image.style.display='inline'; Codehighlighter1_133_490_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_133_490_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_133_490_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">public</span><span style="color: #000000">:<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />    inline </span><span style="color: #0000ff">void</span><span style="color: #000000"> TimeTest_setShowFlag(</span><span style="color: #0000ff">int</span><span style="color: #000000"> flag)<br /><img id="Codehighlighter1_194_227_Open_Image" onclick="this.style.display='none'; Codehighlighter1_194_227_Open_Text.style.display='none'; Codehighlighter1_194_227_Closed_Image.style.display='inline'; Codehighlighter1_194_227_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_194_227_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_194_227_Closed_Text.style.display='none'; Codehighlighter1_194_227_Open_Image.style.display='inline'; Codehighlighter1_194_227_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align="top">    </span><span id="Codehighlighter1_194_227_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_194_227_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />        show_time_ </span><span style="color: #000000">=</span><span style="color: #000000"> flag;<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />    inline </span><span style="color: #0000ff">double</span><span style="color: #000000"> TimeTest_getTime()<br /><img id="Codehighlighter1_271_317_Open_Image" onclick="this.style.display='none'; Codehighlighter1_271_317_Open_Text.style.display='none'; Codehighlighter1_271_317_Closed_Image.style.display='inline'; Codehighlighter1_271_317_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_271_317_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_271_317_Closed_Text.style.display='none'; Codehighlighter1_271_317_Open_Image.style.display='inline'; Codehighlighter1_271_317_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align="top">    </span><span id="Codehighlighter1_271_317_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_271_317_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> end_time_ </span><span style="color: #000000">-</span><span style="color: #000000"> start_time_;<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">double</span><span style="color: #000000"> TimeTest_setTimePoint();<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">protected</span><span style="color: #000000">:<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">double</span><span style="color: #000000"> start_time_;<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">double</span><span style="color: #000000"> end_time_;<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">int</span><span style="color: #000000"> show_time_;<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">virtual</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> SetUp();<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">virtual</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> TearDown();<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000">;<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">#endif</span><span style="color: #000000"> /* GTEST_TIME_H_ */</span></div> 婧愭枃浠秅test_time.cpp----<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img id="Codehighlighter1_0_24_Open_Image" onclick="this.style.display='none'; Codehighlighter1_0_24_Open_Text.style.display='none'; Codehighlighter1_0_24_Closed_Image.style.display='inline'; Codehighlighter1_0_24_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_0_24_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_0_24_Closed_Text.style.display='none'; Codehighlighter1_0_24_Open_Image.style.display='inline'; Codehighlighter1_0_24_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"><span id="Codehighlighter1_0_24_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff">/**/</span><span id="Codehighlighter1_0_24_Open_Text"><span style="color: #008000">/*</span><span style="color: #008000">*<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" /> * gtest_time.cpp<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" /> </span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" />#include </span><span style="color: #000000"><</span><span style="color: #000000">iostream</span><span style="color: #000000">></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" />#include </span><span style="color: #000000">"</span><span style="color: #000000">gtest_time.h</span><span style="color: #000000">"</span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">using</span><span style="color: #000000"> </span><span style="color: #0000ff">namespace</span><span style="color: #000000"> std;<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">#if</span><span style="color: #000000"> defined(WIN32)</span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" />#include </span><span style="color: #000000"><</span><span style="color: #000000">sys</span><span style="color: #000000">/</span><span style="color: #000000">timeb.h</span><span style="color: #000000">></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">double</span><span style="color: #000000"> now()<br /><img id="Codehighlighter1_149_275_Open_Image" onclick="this.style.display='none'; Codehighlighter1_149_275_Open_Text.style.display='none'; Codehighlighter1_149_275_Closed_Image.style.display='inline'; Codehighlighter1_149_275_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_149_275_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_149_275_Closed_Text.style.display='none'; Codehighlighter1_149_275_Open_Image.style.display='inline'; Codehighlighter1_149_275_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_149_275_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_149_275_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">struct</span><span style="color: #000000"> _timeb current;<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />    _ftime(</span><span style="color: #000000">&</span><span style="color: #000000">current);<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">return</span><span style="color: #000000"> (((</span><span style="color: #0000ff">double</span><span style="color: #000000">) current.time) </span><span style="color: #000000">+</span><span style="color: #000000"> (</span><span style="color: #000000">1.0</span><span style="color: #000000"> </span><span style="color: #000000">*</span><span style="color: #000000"> current.millitm) </span><span style="color: #000000">*</span><span style="color: #000000"> </span><span style="color: #000000">0.000001</span><span style="color: #000000">);<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">#else</span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">double</span><span style="color: #000000"> now()<br /><img id="Codehighlighter1_296_438_Open_Image" onclick="this.style.display='none'; Codehighlighter1_296_438_Open_Text.style.display='none'; Codehighlighter1_296_438_Closed_Image.style.display='inline'; Codehighlighter1_296_438_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_296_438_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_296_438_Closed_Text.style.display='none'; Codehighlighter1_296_438_Open_Image.style.display='inline'; Codehighlighter1_296_438_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_296_438_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_296_438_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">struct</span><span style="color: #000000"> timeval current;<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />    gettimeofday(</span><span style="color: #000000">&</span><span style="color: #000000">current, NULL);<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">return</span><span style="color: #000000"> (((</span><span style="color: #0000ff">double</span><span style="color: #000000">) current.tv_sec) </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #000000">1.0e-6</span><span style="color: #000000"> </span><span style="color: #000000">*</span><span style="color: #000000"> ((</span><span style="color: #0000ff">double</span><span style="color: #000000">) current.tv_usec));<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">#endif</span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">void</span><span style="color: #000000"> TimeTest::SetUp()<br /><img id="Codehighlighter1_471_546_Open_Image" onclick="this.style.display='none'; Codehighlighter1_471_546_Open_Text.style.display='none'; Codehighlighter1_471_546_Closed_Image.style.display='inline'; Codehighlighter1_471_546_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_471_546_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_471_546_Closed_Text.style.display='none'; Codehighlighter1_471_546_Open_Image.style.display='inline'; Codehighlighter1_471_546_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_471_546_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_471_546_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />    start_time_ </span><span style="color: #000000">=</span><span style="color: #000000"> now();<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />    end_time_ </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />    TimeTest_setShowFlag(</span><span style="color: #000000">0</span><span style="color: #000000">);<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">void</span><span style="color: #000000"> TimeTest::TearDown()<br /><img id="Codehighlighter1_575_751_Open_Image" onclick="this.style.display='none'; Codehighlighter1_575_751_Open_Text.style.display='none'; Codehighlighter1_575_751_Closed_Image.style.display='inline'; Codehighlighter1_575_751_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_575_751_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_575_751_Closed_Text.style.display='none'; Codehighlighter1_575_751_Open_Image.style.display='inline'; Codehighlighter1_575_751_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_575_751_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_575_751_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">if</span><span style="color: #000000"> (show_time_)<br /><img id="Codehighlighter1_601_749_Open_Image" onclick="this.style.display='none'; Codehighlighter1_601_749_Open_Text.style.display='none'; Codehighlighter1_601_749_Closed_Image.style.display='inline'; Codehighlighter1_601_749_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_601_749_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_601_749_Closed_Text.style.display='none'; Codehighlighter1_601_749_Open_Image.style.display='inline'; Codehighlighter1_601_749_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align="top">    </span><span id="Codehighlighter1_601_749_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_601_749_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />        </span><span style="color: #0000ff">double</span><span style="color: #000000"> used_time </span><span style="color: #000000">=</span><span style="color: #000000"> TimeTest_setTimePoint();<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />        cout </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">[   TIME   ] used time: </span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000"><<</span><span style="color: #000000"> used_time </span><span style="color: #000000"><<</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">(s)</span><span style="color: #000000">"</span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />                </span><span style="color: #000000"><<</span><span style="color: #000000"> endl;<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">double</span><span style="color: #000000"> TimeTest::TimeTest_setTimePoint()<br /><img id="Codehighlighter1_795_851_Open_Image" onclick="this.style.display='none'; Codehighlighter1_795_851_Open_Text.style.display='none'; Codehighlighter1_795_851_Closed_Image.style.display='inline'; Codehighlighter1_795_851_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_795_851_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_795_851_Closed_Text.style.display='none'; Codehighlighter1_795_851_Open_Image.style.display='inline'; Codehighlighter1_795_851_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_795_851_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_795_851_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />    end_time_ </span><span style="color: #000000">=</span><span style="color: #000000"> now();<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">return</span><span style="color: #000000"> TimeTest_getTime();<br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top" alt="" /></span></div> <br />浠ヤ笂鍐呭鍙槸涓涓畝鍗曠殑瀹炵幇錛屾病鏈夎繃澶氱殑嫻嬭瘯錛屼笖鏃墮棿綺懼害涓嶅錛岃宸緝澶с?img src ="http://www.shnenglu.com/volant/aggbug/60201.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/volant/" target="_blank">灝忓</a> 2008-08-27 23:14 <a href="http://www.shnenglu.com/volant/archive/2008/08/27/60201.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>gtest錛坓oogle鐨刢++鍗曞厓嫻嬭瘯錛夎瘯鐢?/title><link>http://www.shnenglu.com/volant/archive/2008/07/31/57620.html</link><dc:creator>灝忓</dc:creator><author>灝忓</author><pubDate>Thu, 31 Jul 2008 04:52:00 GMT</pubDate><guid>http://www.shnenglu.com/volant/archive/2008/07/31/57620.html</guid><wfw:comment>http://www.shnenglu.com/volant/comments/57620.html</wfw:comment><comments>http://www.shnenglu.com/volant/archive/2008/07/31/57620.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.shnenglu.com/volant/comments/commentRss/57620.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/volant/services/trackbacks/57620.html</trackback:ping><description><![CDATA[google寮婧愪簡c++鍗曞厓嫻嬭瘯妗嗘灦錛岀湡璁╀漢鍏村銆傚畨瑁呯殑榪囩▼姣旇緝綆鍗曪紝鍦╡clipse+mingw+cygwin涓嬪緢easy灝辨悶瀹氫簡銆備嬌鐢ㄤ篃寰堝鏄擄紝鎸夌収sample涓嶇敤鐪嬫枃妗d篃鑳藉緢蹇笂鎵嬨傝繃紼嬪氨涓嶅灝戜簡錛岃鐐逛笢瑗垮蹇樸?br /><br />鏂█錛?br />ASSERT_TRUE(condition); EXPECT_TRUE(condition); condition涓虹湡<br />ASSERT_FALSE(condition);    EXPECT_FALSE(condition);    condition涓哄亣<br /><br />ASSERT_EQ(expected, actual);    EXPECT_EQ(expected, actual);    expected == actual<br />ASSERT_NE(val1, val2);  EXPECT_NE(val1, val2);  val1 != val2<br />ASSERT_LT(val1, val2);  EXPECT_LT(val1, val2);  val1 < val2<br />ASSERT_LE(val1, val2);  EXPECT_LE(val1, val2);  val1 <= val2<br />ASSERT_GT(val1, val2);  EXPECT_GT(val1, val2);  val1 > val2<br />ASSERT_GE(val1, val2);  EXPECT_GE(val1, val2);  val1 >= val2<br /><br />ASSERT_STREQ(expected_str, actual_str); EXPECT_STREQ(expected_str, actual_str); 涓や釜C瀛楃涓叉湁鐩稿悓鐨勫唴瀹?br />ASSERT_STRNE(str1, str2);   EXPECT_STRNE(str1, str2); 涓や釜C瀛楃涓叉湁涓嶅悓鐨勫唴瀹?br />ASSERT_STRCASEEQ(expected_str, actual_str); EXPECT_STRCASEEQ(expected_str, actual_str); 涓や釜C瀛楃涓叉湁鐩稿悓鐨勫唴瀹癸紝蹇界暐澶у皬鍐?br />ASSERT_STRCASENE(str1, str2);   EXPECT_STRCASENE(str1, str2);   涓や釜C瀛楃涓叉湁涓嶅悓鐨勫唴瀹癸紝蹇界暐澶у皬鍐?br /><br />澶存枃浠訛細<br />#include <gtest/gtest.h><br /><br />main錛?br />    testing::InitGoogleTest(&argc, argv);<br />    return RUN_ALL_TESTS();<br /><br />搴擄細<br />    -lgtest<br /><br /><img src ="http://www.shnenglu.com/volant/aggbug/57620.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/volant/" target="_blank">灝忓</a> 2008-07-31 12:52 <a href="http://www.shnenglu.com/volant/archive/2008/07/31/57620.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[瀵煎叆]鎼緩cppunit鍗曞厓嫻嬭瘯鐜http://www.shnenglu.com/volant/archive/2008/06/02/57611.html灝忓灝忓Mon, 02 Jun 2008 10:30:00 GMThttp://www.shnenglu.com/volant/archive/2008/06/02/57611.htmlhttp://www.shnenglu.com/volant/comments/57611.htmlhttp://www.shnenglu.com/volant/archive/2008/06/02/57611.html#Feedback0http://www.shnenglu.com/volant/comments/commentRss/57611.htmlhttp://www.shnenglu.com/volant/services/trackbacks/57611.html
鏂囩珷鏉ユ簮:http://blog.csdn.net/volant_hoo/archive/2008/06/02/2502339.aspx

灝忓 2008-06-02 18:30 鍙戣〃璇勮
]]>
[瀵煎叆]緇忓吀綆楁硶鈥斺旀眰鏈澶у瓙搴忓垪鍜?2) http://www.shnenglu.com/volant/archive/2008/04/07/57614.html灝忓灝忓Mon, 07 Apr 2008 12:16:00 GMThttp://www.shnenglu.com/volant/archive/2008/04/07/57614.htmlhttp://www.shnenglu.com/volant/comments/57614.htmlhttp://www.shnenglu.com/volant/archive/2008/04/07/57614.html#Feedback0http://www.shnenglu.com/volant/comments/commentRss/57614.htmlhttp://www.shnenglu.com/volant/services/trackbacks/57614.html
鏂囩珷鏉ユ簮:http://blog.csdn.net/volant_hoo/archive/2008/04/07/2256611.aspx

灝忓 2008-04-07 20:16 鍙戣〃璇勮
]]>
[瀵煎叆]緇忓吀綆楁硶鈥斺旀眰鏈澶у瓙搴忓垪鍜?1)http://www.shnenglu.com/volant/archive/2008/04/05/57615.html灝忓灝忓Fri, 04 Apr 2008 23:54:00 GMThttp://www.shnenglu.com/volant/archive/2008/04/05/57615.htmlhttp://www.shnenglu.com/volant/comments/57615.htmlhttp://www.shnenglu.com/volant/archive/2008/04/05/57615.html#Feedback0http://www.shnenglu.com/volant/comments/commentRss/57615.htmlhttp://www.shnenglu.com/volant/services/trackbacks/57615.html
鏂囩珷鏉ユ簮:http://blog.csdn.net/volant_hoo/archive/2008/04/04/2252490.aspx

灝忓 2008-04-05 07:54 鍙戣〃璇勮
]]>
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            欧美日韩影院| 麻豆视频一区二区| 伊人成年综合电影网| 国产精品高潮在线| 国产精品福利av| 国产精品日日摸夜夜摸av| 欧美日韩视频| 国产日韩欧美精品综合| 国内精品模特av私拍在线观看| 伊人久久大香线| 亚洲精品在线一区二区| 欧美一区二区私人影院日本 | 亚洲一区国产精品| 久久高清免费观看| 亚洲电影免费观看高清完整版| 欧美激情一区二区三区| 99精品国产福利在线观看免费| 亚洲欧美久久| 久久久久九九九| 欧美国产日韩精品| 国产目拍亚洲精品99久久精品 | 亚洲电影毛片| 亚洲天堂av图片| 久久精品国产清高在天天线| 欧美国产视频一区二区| 欧美视频在线一区| 国产亚洲人成a一在线v站| 亚洲精品中文在线| 久久久久久久久久久久久久一区 | 国产女主播一区二区三区| 在线观看福利一区| 亚洲欧美日韩精品久久亚洲区 | 一本大道久久a久久综合婷婷| 欧美一区二区三区在线免费观看| 亚洲第一精品久久忘忧草社区| 亚洲伊人伊色伊影伊综合网| 欧美成人免费一级人片100| 国产欧美高清| 亚洲视频日本| 久久福利影视| 亚洲免费电影在线| 久久狠狠一本精品综合网| 亚洲精品一区二区在线观看| 久久三级视频| 在线观看亚洲一区| 久久久久成人精品| 亚洲欧美日韩专区| 欧美性猛交xxxx免费看久久久| 亚洲免费观看在线观看| 欧美xx视频| 久久免费精品日本久久中文字幕| 国产一区二区三区成人欧美日韩在线观看| 亚洲网站在线播放| 亚洲精选视频免费看| 欧美高清在线一区| 亚洲免费精彩视频| 亚洲精品精选| 欧美特黄一区| 亚洲欧美日韩精品| 亚洲深夜福利在线| 国产精品一二三视频| 久久岛国电影| 久久激情视频免费观看| 娇妻被交换粗又大又硬视频欧美| 久久久之久亚州精品露出| 欧美亚洲三区| 在线观看欧美日韩国产| 欧美大片免费观看在线观看网站推荐| 久久精品国产综合精品| 18成人免费观看视频| 欧美黄色一级视频| 欧美精选在线| 欧美一级淫片aaaaaaa视频| 欧美一级播放| 亚洲精品国产精品国自产观看浪潮 | 亚洲午夜性刺激影院| 一本久久综合亚洲鲁鲁| 国产精品高潮呻吟久久| 欧美制服丝袜| 久久人人看视频| 日韩一区二区久久| 一区二区三区黄色| 国产麻豆综合| 欧美成人在线免费观看| 欧美久久久久久久久久| 香蕉成人伊视频在线观看| 久久国产主播| av成人免费在线观看| 亚洲永久在线观看| 在线观看欧美日韩国产| 日韩午夜一区| 黄色综合网站| 日韩亚洲国产欧美| 国内精品久久久久久| 久久不射中文字幕| 国产日韩综合一区二区性色av| 一本色道**综合亚洲精品蜜桃冫| 亚洲图色在线| 韩日欧美一区二区| 国产精品99久久久久久久女警 | 六月婷婷一区| 欧美日韩另类丝袜其他| 久久久久国产精品一区三寸| 久久综合久色欧美综合狠狠| 亚洲无亚洲人成网站77777| 久久精品国产清高在天天线| 亚洲最新视频在线| 亚洲夜间福利| 99精品国产福利在线观看免费 | 尤物99国产成人精品视频| 日韩视频二区| 91久久精品视频| 欧美中在线观看| 亚洲主播在线| 欧美精品v日韩精品v国产精品| 欧美在线你懂的| 欧美揉bbbbb揉bbbbb| 亚洲高清久久久| 精品999在线播放| 欧美一级欧美一级在线播放| 亚洲一区二区在线视频| 欧美华人在线视频| 欧美岛国激情| 黄色成人在线网站| 欧美专区中文字幕| 欧美制服丝袜第一页| 国产精品理论片| 在线视频亚洲一区| 亚洲一区观看| 国产美女诱惑一区二区| 亚洲欧美在线免费观看| 欧美一区二区三区精品电影| 国产精品久久夜| 亚洲女同精品视频| 亚洲欧美资源在线| 国产精品美女999| 亚洲综合久久久久| 欧美一级午夜免费电影| 国产精品资源在线观看| 亚洲欧美国产视频| 欧美一区二区播放| 国内精品久久久久久| 久久久久久日产精品| 欧美a级片一区| 亚洲老司机av| 欧美日韩国产精品专区 | 亚洲深夜福利视频| 亚洲欧美成人一区二区三区| 国产精品成人观看视频国产奇米| 在线亚洲免费| 久久精品欧美| 亚洲经典自拍| 欧美视频在线观看一区| 亚洲男人的天堂在线观看| 亚洲国产成人午夜在线一区| 亚洲三级影院| 欧美福利电影在线观看| 亚洲精品乱码久久久久久按摩观| 一区二区三区视频在线 | 欧美天堂亚洲电影院在线观看| 国产精品99久久久久久宅男| 欧美一区二区日韩| 136国产福利精品导航网址| 欧美国产激情二区三区| 在线午夜精品自拍| 久久婷婷影院| 99国产精品99久久久久久粉嫩| 国产精品黄视频| 久久精品女人| aaa亚洲精品一二三区| 久久久欧美精品sm网站| 日韩视频在线观看| 国产人久久人人人人爽| 欧美xxx成人| 欧美一区亚洲| 一区二区三区黄色| 免费亚洲婷婷| 欧美一级久久久| 一区二区三区毛片| 国产一区二区电影在线观看| 欧美精品一区二区三区四区| 欧美一区二区高清在线观看| 亚洲精品国产日韩| 蜜桃av一区二区在线观看| 亚洲综合色婷婷| 日韩午夜在线播放| 在线播放日韩| 国产一区二区三区成人欧美日韩在线观看 | 欧美好骚综合网| 久久av一区二区| 一区二区三区精密机械公司| 欧美成人a视频| 久久成人人人人精品欧| 99精品国产高清一区二区| 国产综合在线看| 国产精品videosex极品| 欧美不卡激情三级在线观看| 香蕉国产精品偷在线观看不卡| 亚洲黄色成人久久久| 久久九九精品|