nadrad / h-m-m

Hackers Mind Map
GNU General Public License v3.0
1.89k stars 53 forks source link

Unit testing sketch #5

Closed Wojciechem closed 1 year ago

Wojciechem commented 2 years ago

First of all, please feel free to reject this PR if you don't like it; this is just an idea / playing around to understand the internals.

Since function definitions and calls (program execution) are all in one file, it could not be included in another script. I don't want to break the simplicity of "all in one file", hence the proposed const to conditionally disable execution.

llagerlof commented 2 years ago

@Wojciechem I liked your attitude. The fact that this project is just a file does not detract from its usefulness. Many developers just like to badmouth other people's programs instead of trying to understand why it was made that way.

Wojciechem commented 2 years ago

@nadrad please let me know what you think when you take a look at it 😉

nadrad commented 2 years ago

Thanks a lot, @Wojciechem I've never done something like this and don't understand it right away. So, give me some time to learn how these things work and then get back to it :)

nadrad commented 1 year ago

Thanks again, @Wojciechem for the PR.

I spent some time on this idea, but it seems to me that having a proper understanding of how automated tests can work here needs more time, and I'm not completely happy with php to make such an investment. I'm thinking about learning a new programming language and rebuilding h-m-m in it instead. So, I think it's best to leave automated tests in php out for now. Sorry :)

Wojciechem commented 1 year ago

It's ok :) If you ever decide to give php another chance, feel free to ping me ;)