• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

torbjoernk/CppKoans: Inspired by RubyKoans and JavaScript-Koans, this is an atte ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

torbjoernk/CppKoans

开源软件地址:

https://github.com/torbjoernk/CppKoans

开源编程语言:

C++ 98.1%

开源软件介绍:

#CppKoans

Inspired by RubyKoans and JavaScript-Koans, this is an attempt to write such koans for C/C++.

Some ideas were taken from PointerKoans.

###Prerequesites You will need CMake.

And of course a C++ compiler. I just tested it with a recent GCC.

##How to walk the path to enlightment

  1. Get the sources

     git clone git://github.com/torbjoernk/CppKoans.git
    
  2. Create a build directory

     cd CppKoans
     mkdir build
     cd build
    
  3. Configure the build

     cmake ..
    
  4. Compile

     make
    
  5. Run

     ./CppKoans
    

Now follow the instructions printed from the very beginning.

The files, you will need to edit are in CppKoans/koans. Each time you saved a file and want to rerun the koans, you need to compile it first. Thus, walking the path to enlightment is a repetition of these steps:

  1. Edit and save a file in CppKoans/koans

  2. Compile in CppKoans/build by running make

  3. Read the master's reply with ./CppKoans/build/CppKoans

##Adding further Koans ###To existing episodes Just define a new private void function without parameters in the bottom section of the episode's header file it should belong to. Then go to the implementation file of that episode and implement your new koan. Finally add your newly created koan to the run() function in the header file of that episode and increase the num_tests counter by one (or whatevery amount of koans you added).

###New episodes There is a sample episode, which can be used as a template for new episodes. After copying and renaming of ~/headers/koanXX_sample_koans.hpp and ~/koans/koanXX_sample_koans.cpp the following steps are necessary:

  1. add the implementation file to ~/koans/CMakeLists.txt

  2. add the header file to ~/headers/all_koans.hpp

  3. enable and activate the new episode in ~/cppkoans.cpp

##Licence MIT License Copyright 2012 Torbjörn Klatt - opensource eht torbjoern minus klatt dot de




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap