How to display certain links in a menu only if a precondition is met? I've added a checkbox to menu creation so that certain items in the menu will be displayed only if that checkbox is ticked (For test user).

That's the theory anyway.
How can I determine if that checkbox is ticked when displaying the menu on a page?
I assume some hook is involved here, but I can't quite figure out which one.
Any nudging in the right direction is more than welcome.
First of all you need to store value of 'For Test User' checkbox as variable OR as separate column in menu_links table.

like variable_set(url, checkbox_value);

By using hook_menu_alter you can check the variable is set for that url. and if its not set you can set $items['url']['access callback'] = FALSE, By setting this menu will not be visible.

Let me know if anything different required.