Backend tests for diagrams