GitXplorerGitXplorer
l

libft_xcode_tests

public
5 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
7a4ae606b8c9b513e13972846f27945534496aa0

Clarified readme concerning where to put source files

llgutter committed 6 years ago
Unverified
9c87c0ca84a4c26b6fba169c708078daf8118d7c

Fixed gitignore for Build folder

llgutter committed 6 years ago
Unverified
62477b5f0c2a9894eb79ee545827813ea639fdf9

Updated gitignore to ignore build folder

llgutter committed 6 years ago
Unverified
a99bf1c91af0715270907a476f7c896f8c7d6377

Added test for strlcat with a short src

llgutter committed 6 years ago
Unverified
9e2a35c169b48d4f93877b77687b2e4caa2ccd40

Improved test feedback for ft_itoa

llgutter committed 6 years ago
Unverified
6f44306a73e6a19d7494bdf8006626e33404b10d

Fixed depency issue in lstdel and lstdelone

llgutter committed 6 years ago

README

The README file for this repository.

libft Xcode tests

PLEASE WRITE YOUR OWN TESTS BEFORE TRYING OUT THESE!
The whole reason I made these instead of using the ones already on GitHub, is because it taught me a LOT.

These are my personal tests for libft, written in objective C using the XCTest framework within Xcode.

All functions are tested (part 1, 2 and bonus), but there is no NULL protection testing.
These also do not tests cases where the real function breaks, so consider these tests the basics!
You might however, find errors not found by some other tests on GitHub.

Set up

To set up these tests follow these steps:

  • git clone & open the test project by running this from your terminal:
    git clone https://github.com/lgutter/libft_xcode_tests.git && open libft_xcode_tests/libftt*
  • Click the arrow next to the blue icon labeled "libfttests" to reveal a couple folders, including a "Source Files" group (folder icon).
  • Drag and drop all your .c files and your libft.h file to the "Source Files" group in Xcode (drag them just below the "Source Files" folder icon in the Xcode interface), and click finish in the window that pops up. (note: the target has to be libfttests, but this should be default.)
  • Build your library using the Play button on the top, just to check your library compiles within Xcode. (it might show you some implicit conversions, I would advise you to fix those.)

Running the tests

To run the tests, hold LMB on the play button and then select the test button. Xcode will now run all the tests on your libft.
If one of the tests gave a system error, Xcode will jump to that test or function.
If xcode shows the error at a "free" call, you did not properly allocate that return string. Otherwise the problem is in whatever function xcode points to.
You can temporarily disable a test that gives a system error to complete all tests, just don't forget to correct that mistake!
Once Xcode is able to run all the tests it will show you which have failed, and when you click the test you will get more information on what failed.

Good luck!

Support

Can't get it to work or have bug reports / suggestions?
Feel free to contact me: https://profile.intra.42.fr/users/lgutter