Added assertion test in main.cpp