Testing

๋Ÿฌ์ŠคํŠธ์™€ ์นด๊ณ (cargo)๋Š” ๊ฐ„๋‹จํ•œ ํ…Œ์ŠคํŠธ ํ”„๋ ˆ์ž„์›Œํฌ์™€ ํ•จ๊ป˜ ์ œ๊ณต๋ฉ๋‹ˆ๋‹ค:

  • ๋‹จ์œ„ ํ…Œ์ŠคํŠธ๋Š” ์ฝ”๋“œ ์ „๋ฐ˜์—์„œ ์ง€์›๋ฉ๋‹ˆ๋‹ค.
  • ํ†ตํ•ฉํ…Œ์ŠคํŠธ๋Š” test/ ํด๋”๋ฅผ ํ†ตํ•ด ์ง€์›๋ฉ๋‹ˆ๋‹ค.

Rust and Cargo come with a simple unit test framework:

  • Unit tests are supported throughout your code.
  • Integration tests are supported via the tests/ directory.