Lines Matching full:actual
286 static le_bool compareResults(const char *testID, TestResult *expected, TestResult *actual)
291 if (actual->glyphCount != expected->glyphCount) {
293 testID, expected->glyphCount, actual->glyphCount);
297 for (i = 0; i < actual->glyphCount; i += 1) {
298 if (actual->glyphs[i] != expected->glyphs[i]) {
300 testID, i, expected->glyphs[i], actual->glyphs[i]);
305 for (i = 0; i < actual->glyphCount; i += 1) {
306 if (actual->indices[i] != expected->indices[i]) {
308 testID, i, expected->indices[i], actual->indices[i]);
313 for (i = 0; i <= actual->glyphCount; i += 1) {
314 double xError = uprv_fabs(actual->positions[i * 2] - expected->positions[i * 2]);
315 double yError = uprv_fabs(actual->positions[i * 2 + 1] - expected->positions[i * 2 + 1]);
319 testID, i, expected->positions[i * 2], actual->positions[i * 2]);
329 testID, i, expected->positions[i * 2 + 1], actual->positions[i * 2 + 1]);
454 TestResult actual;
472 actual.glyphCount = le_layoutChars(engine, text, 0, charCount, charCount, getRTL(text, charCount), 0, 0, &status);
474 actual.glyphs = NEW_ARRAY(LEGlyphID, actual.glyphCount);
475 actual.indices = NEW_ARRAY(le_int32, actual.glyphCount);
476 actual.positions = NEW_ARRAY(float, actual.glyphCount * 2 + 2);
478 le_getGlyphs(engine, actual.glyphs, &status);
479 le_getCharIndices(engine, actual.indices, &status);
480 le_getGlyphPositions(engine, actual.positions, &status);
482 compareResults(testID, expected, &actual);
484 DELETE_ARRAY(actual.positions);
485 DELETE_ARRAY(actual.indices);
486 DELETE_ARRAY(actual.glyphs);