Imported Upstream version 3.4.0
[platform/upstream/harfbuzz.git] / src / test.cc
index cf59e00..d848cf1 100644 (file)
  * Google Author(s): Behdad Esfahbod
  */
 
-#include "hb-private.hh"
-
-#include "hb.h"
-
-#include <stdio.h>
+#include "hb.hh"
 
 #ifdef HAVE_FREETYPE
 #include "hb-ft.h"
 #endif
 
+#ifdef HB_NO_OPEN
+#define hb_blob_create_from_file_or_fail(x)  hb_blob_get_empty ()
+#endif
+
 int
 main (int argc, char **argv)
 {
@@ -42,7 +42,8 @@ main (int argc, char **argv)
     exit (1);
   }
 
-  hb_blob_t *blob = hb_blob_create_from_file (argv[1]);
+  hb_blob_t *blob = hb_blob_create_from_file_or_fail (argv[1]);
+  assert (blob);
   printf ("Opened font file %s: %u bytes long\n", argv[1], hb_blob_get_length (blob));
 
   /* Create the face */