{% if include.featured == true and product.featured == true %}
{% assign test = true %}
{% endif %}
{% if include.featured == false and product.featured == false %}
{% assign test = true %}
{% endif %}
{% if test %}
Yepeeee!
{% endif %}
<!--
Another way you can condense this is to combine else if statements, and booleans don't necessarily need the "==" when evaluating true:
-->
{% if include.featured and product.featured %}
{% assign test = true %}
{% elsif include.featured == false and product.featured == false %}
{% assign test = false %}
{% endif %}