1. JMock/JTest for XCode
今日计划:
* 完成gtest在mac上的build与运行
* 完成自己的一个test,并上传到internet上新建的repository
* 完成gmock例子并上传
* 了解gtest/xcode
2. addertest.cpp
Q: “endl" not working ?
use "#include <iostream.h> rather than <iostream>. What's the difference ?
# make error as follows:
usr/include/c++/4.2.1/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
g++ -I../include -g -Wall -Wextra -c ./addertest.cpp
./addertest.cpp: In member function ‘virtual void AdderTest_normal_Test::TestBody()’:
./addertest.cpp:6: error: expected unqualified-id before ‘(’ token
make: *** [addertest.o] Error 1
root cause: typo in addertest.cpp
TEST(AdderTest, normal) {
Adder *adder = new Adder;
EXPECT_EQ(15, adder->(5,10));
^ should be adder->add(5,10)
//EXPECT_EQ(1,1);
}
2:52PM, done addertest,cpp ( around 2.5 hours )
3. find a place to host my study code.
* source forge:
user: printf1998
project: fzspace
svn: svn checkout svn://svn.code.sf.net/p/fzspace/code-0/trunk fzspace-code-0
* playing svn
frankzoumatoMacBook-Pro:gtest frankzou$ svn ci -m "putting hello-gtest into svn @ study/testing/gtest"
svn: Commit failed (details follow):
svn: Authorization failed
frankzoumatoMacBook-Pro:gtest frankzou$ pwd
/Users/frankzou/study/gtest/gtest-1.6.0/frank-study/gtest
Note:可能需要使用不同的check out命令
svn checkout svn://svn.code.sf.net/p/fzspace/code-0/trunk fzspace-code-0: not working !
try this:
svn checkout --username=printf1998 svn+ssh://printf1998@svn.code.sf.net/p/fzspace/code-0/trunk fzspace-code-0
* SVN 总结
svn ci仅对当前目录及子目录有效
svn add仅对当前目录有效(对子目录的操作仅在第一次有效,总是需要进和各级子目录执行add操作)
## 杂记
* 关于新开一个 open-source的地方,如何选择?
GitHub vs. CodeFlex vs. SourceForge vs. GoogleCode ?
## 杂问:
Q:如何使SVN命令行不用重复输入密码?