unit test / run test in xfce code (here clipman)?

Sylvain Viart <[email protected]>
Newsgroups gmane.comp.desktop.xfce.devel.version4
Message-ID <[email protected]>
Hi,

I've produced a consequent code modification in clipman to add secure 
item feature 
<https://gitlab.xfce.org/Sylvain/xfce4-clipman-plugin/-/tree/dev-refactor-indexes>.
I now test it personally at full time since September 2021, it's useful 
and doesn't crash.

I would like to add test, or more tests, because there's a tests folder.
But I'm not sure how it should be done, nor how to automate test.

I didn't find Makefile target like: make test

Could you explain me how you add test to the code structure?

What I already get, which doesn't explain about unit-testing strategy.

https://wiki.xfce.org/dev/howto/panel_plugins#testing_and_releasing_the_plugin 
<https://wiki.xfce.org/dev/howto/panel_plugins#testing_and_releasing_the_plugin>


Basically I produced a new data structure to handle index of element, an 
indexed double linked list:

index:   [   0     ,       1   ,       2   ]
              |             |           |
list:        |             |           |
              |             |           |
              |             | |
head ->   [item1] <=>  [item2] <=> [item3]

Which allow me to access any element by id, and I also maintain a 
circular indexes, reusing freed index and clipman history resizing.
I would like to refactor the code and extract the data structure from 
the history and to keep it under tests, because pointer and indexes 
already gave me some strong
debugging sessions. So I learned remote debugging 😁

Do you have some rules about testing to follow, or could I introduce any 
Makefile target I want?
Do you have to project example to give me that introduces testing in its 
code base? So I could borrow the code structure.

Happy Christmas code hacking,
Sylvain.

-- 
Sylvain Viart - GNU/Linux Sysadmin/Developer/DevOps - France	

_______________________________________________
Xfce4-dev mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.