slycelote / caide

Automates certain common tasks that you do during programming competitions
86 stars 19 forks source link

httpServer doesn't exit on Return key in Windows #41

Closed Spidy104 closed 3 years ago

Spidy104 commented 3 years ago

While running caide httpServer and then clicking on the competitive companion, the problem gets parsed successfully, and then if I hit enter to exit, it doesn't exit and the server runs forever, How to stop this???

And How to debug my code when not using visual studio, I generally use print statements to know what is happening but caide doesn't keep execute those cerr statements and hence I cannot debug the code...

So what to do in this case??

slycelote commented 3 years ago

caide definitely doesn't do anything with std::cerr.

$ caide problem prob
Problem successfully created in folder prob
$ cd prob/
$ echo 1 > case1.in
$ vim prob.cpp (Insert std::cerr << "Hi" << std::endl;)
$ g++ prob.cpp prob_test.cpp
$ ./a.out
Running test case1
Hi

Results summary
_______________
Outcome Count
EtalonUnknown   1

As for the server not exiting on Enter: what is your OS? (You can always use Ctrl+C too).

Spidy104 commented 3 years ago

Thanks, I will see the std::cerr thing once more, btw my os is windows...

Spidy104 commented 3 years ago

I also had one question, How do I add my own testcases, and How do I add test cases , whose output I don't know??

slycelote commented 3 years ago

Please post separate issues. In case it's not a bug, you can post a Q&A in Discussions. Your question is answered in the README:

.in and .out files contain sample input and output. You can add your own sample cases.

  • Rename .out file to .skip to skip the test.
  • Delete it or rename to something else to indicate that the etalon output is unknown.