Jump to content

Possible to create commit with patch?


Recommended Posts

2 hours ago, badosu said:

Thank you for your contribution as said 

 

17 minutes ago, nani said:

Unfortunately (or not :)) someone already uploaded a similar patch fixing the same issue (https://code.wildfiregames.com/D1587). You gotta check beforehand if an existing patch/trac issue already exist specially given 0ad trac record of bugs and patches on queue since 3+ years or so.

It is duplicate try maybe to look at some of the simple tickets.

Edited by asterix
Link to comment
Share on other sites

20 minutes ago, badosu said:

Well, this is a straightforward fix to merge, it does not do much apart from what it's supposed to

Thanks for contributing btw! You can take over the other patch, by commandeering it :)

Link to comment
Share on other sites

5 minutes ago, badosu said:

I dealt with allocations and map boundaries, I'd like to make and run javascript tests but wat not able to find in the documentation

You will need to compile the game for this.

Link to comment
Share on other sites

You need to add a file to

binaries/data/mods/public/maps/random/tests

Like 

https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/maps/random/tests

You have a few function called TS_ASSERT_* that will allow you to make sure things are working correctly.

To write tests try to think of all the cases that should happen ( and sometimes should'nt) and make sure it goes as expected.

Basically imagine the functions you wrote in the other file are used as black box.

Link to comment
Share on other sites

21 minutes ago, badosu said:

Yes, that was my plan, but I ran `binaries/system/test --help-tests` and didn't find `test_RectPlacer` there.

Anyway, I'll try and find out if it's running and just not showing, thanks!

What OS are you on ? You might need DBGview for easier test debugging. (It will show the console output warnings and such)

As for why you didn't see it it's because it's embedded in scripts (there is one big test for all the js)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...