Giter VIP home page Giter VIP logo

defective-project's Introduction

defective-project

CircleCI

このプロジェクトはバグだらけのプロジェクトです。皆さんの力ですべてのバグを取り除いてください。 問題は、基本的にこの資料から出題されます。

バグの取り除き方

プログラムはsrcディレクトリにあります。それに対応したテストプログラムはtestに用意されています。章ごとに問題のファイルは分けられてあります。

src/01-type/hoge.rb
test/01-type/hoge_test.rb

テストプログラムは、プログラムの返して欲しい結果が書いてあります。また問題に記述されてあるコメントを頼りにプログラムを修正しましょう。テストプログラムは変更してはいけません。修正出来たと思ったら、テストを実行してみましょう。無事テストが通っていれば成功です。

テストの実行方法

テスト対象のコードは、testディレクトリ化に配置されてあります。 テストコードは、_test.rbという名前の規則でネーミングされてあります。 テストの実行は、Rubyの実行と同様に、次のようなコマンドruby foo_test.rbで実行できます。

個別実行

実行コードと対になるように章ごとにテストは配置しているので、自分が実行したい問題のファイル名のパスを指定して実行しましょう。

$ ruby test/0x_hoge/foo_test.rb

全体実行

すべてのテストを実行するには、以下のコマンドを実行します。 このコマンドが成功したときが、皆さんの勝利となります。

$ ruby test/all_test.rb

すべての終わり

すべてのバグが取り除かれれば、この説明文の一番上のバッジがPASSEDとなり緑になるはずです。みなさん、それを目指しましょう。また、テストをただ通すだけではいけません。誰が見てもわかりやすいスマートな解法を目指してみましょう。

defective-project's People

Contributors

ababup1192 avatar chikuwait avatar misoton665 avatar motxx avatar romtin avatar s1230149 avatar tspider0176 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.