Skip to content

vitoriagalli/42libasm_tester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

42libasm_tester

Introduction

This is a simple shell script that automate tests for the 42 Project Libasm/2020.

  • check compilation error
  • check the function output
  • check the return value
  • check the errno value for functions with system calls
  • check memory leak when necessary

Usage

⚠️ Running on VM 42 Linux only

Prerequisites

GNU Make
NASM Compiler
Valgrind

Build Instructions

Clone this repo into libasm root's directory.
Make sure your Makefile has the make re rule, and make bonus rule if you want to test the bonus functions.
Both adding the objects to the libasm.a library.

$ git clone https://github.com/vscabell/42libasm_tester.git
$ cd 42libasm_tester
$ bash runtest.sh
$ bash runtest.sh bonus

Add successively the functions in the order you want, for example

$ bash runtest.sh write
$ bash runtest.sh strlen strdup
$ bash runtest.sh bonus atoi_base

Check if any memory leak was detected

$ bash runtest.sh leak
$ bash runtest.sh bonus leak

Take a look at /42libasm_tester/unit_tests/diffs directory for diffs files


Some of the outputs examples

outputs

⚠️    not official tests   ⚠️
⚠️ still has lots of bugs⚠️

About

A tester for the Libasm Project 42 cursus, 2020

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published