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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...