feat(09): finishing the exercice 01
This commit is contained in:
parent
bf81e18e76
commit
429896d153
3 changed files with 163 additions and 19 deletions
|
|
@ -6,7 +6,7 @@
|
|||
# By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2023/11/12 11:05:05 by rparodi #+# #+# #
|
||||
# Updated: 2025/04/27 13:01:07 by rparodi ### ########.fr #
|
||||
# Updated: 2025/04/27 18:52:30 by rparodi ### ########.fr #
|
||||
# #
|
||||
# **************************************************************************** #
|
||||
|
||||
|
|
@ -83,6 +83,38 @@ $(OBJDIRNAME)/%.o: %.cpp
|
|||
@printf '$(GREY) Compiling $(END)$(GREEN)$<$(END)\n'
|
||||
@$(CXX) $(CXXFLAGS) -o $@ -c $<
|
||||
|
||||
test:
|
||||
@printf '$(GREY) Testing with $(END)$(GOLD)./RPN ""$(END)\n'
|
||||
@./$(NAME) ""
|
||||
@printf '\n'
|
||||
@printf '$(GREY) MemCheck with $(END)$(GOLD)./RPN ""$(END)\n'
|
||||
@valgrind ./$(NAME) "" 2> /tmp/RPN_test
|
||||
@cat /tmp/RPN_test | rg --color=always "ERROR SUMMARY" -A 10
|
||||
@printf '$(GREY) Testing with $(END)$(GOLD)./RPN "8 9 * 9 - 9 - 9 - 4 - 1 +"$(END)\n'
|
||||
@./$(NAME) "8 9 * 9 - 9 - 9 - 4 - 1 +"
|
||||
@printf '\n'
|
||||
@printf '$(GREY) MemCheck with $(END)$(GOLD)./RPN "8 9 * 9 - 9 - 9 - 4 - 1 +"$(END)\n'
|
||||
@valgrind ./$(NAME) "8 9 * 9 - 9 - 9 - 4 - 1 +" 2> /tmp/RPN_test
|
||||
@cat /tmp/RPN_test | rg --color=always "ERROR SUMMARY" -A 10
|
||||
@printf '$(GREY) Testing with $(END)$(GOLD)./RPN "7 7 * 7 -"$(END)\n'
|
||||
@./$(NAME) "7 7 * 7 -"
|
||||
@printf '\n'
|
||||
@printf '$(GREY) MemCheck with $(END)$(GOLD)./RPN "7 7 * 7 -"$(END)\n'
|
||||
@valgrind ./$(NAME) "7 7 * 7 -" 2> /tmp/RPN_test
|
||||
@cat /tmp/RPN_test | rg --color=always "ERROR SUMMARY" -A 10
|
||||
@printf '$(GREY) Testing with $(END)$(GOLD)./RPN "1 2 * 2 / 2 * 2 4 - +"$(END)\n'
|
||||
@./$(NAME) "1 2 * 2 / 2 * 2 4 - +"
|
||||
@printf '\n'
|
||||
@printf '$(GREY) MemCheck with $(END)$(GOLD)./RPN "1 2 * 2 / 2 * 2 4 - +"$(END)\n'
|
||||
@valgrind ./$(NAME) "1 2 * 2 / 2 * 2 4 - +" 2> /tmp/RPN_test
|
||||
@cat /tmp/RPN_test | rg --color=always "ERROR SUMMARY" -A 10
|
||||
@printf '$(GREY) Testing with $(END)$(GOLD)./RPN "(1 + 1)"$(END)\n'
|
||||
@./$(NAME) "(1 + 1)"
|
||||
@printf '\n'
|
||||
@printf '$(GREY) MemCheck with $(END)$(GOLD)./RPN "(1 + 1)"$(END)\n'
|
||||
@valgrind ./$(NAME) "(1 + 1)" 2> /tmp/RPN_test
|
||||
@cat /tmp/RPN_test | rg --color=always "ERROR SUMMARY" -A 10
|
||||
|
||||
# Header
|
||||
header:
|
||||
@clear
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue