1. A computer-implemented method, comprising: determining types of directionalities that each describe a visual direction of elements in a user interface layout; defining, for a rendering, expressions that each describe a first relationship for each determined type of directionality between the elements; forming a set comprising each of the expressions representative of each of the first relationships, the set defined as a second relationship based on spatial relationships that describe positions of the elements; receiving a selection of one of the determined types of directionalities; selecting one of the first relationships in the set that corresponds to the selection of one of the types of determined directionalities; and testing the user interface layout based on the spatial relationships of the elements and independent of the types of determined directionalities.