[gjs] coverage: Rename GjsDebugCoverage to GjsCoverage in all places



commit 5cdb28d58189d9d29b094dde2f5f86358e209ed6
Author: Sam Spilsbury <smspillaz gmail com>
Date:   Sat Jun 13 11:00:05 2015 +0800

    coverage: Rename GjsDebugCoverage to GjsCoverage in all places

 gjs/coverage.cpp |   28 ++++++++++++++--------------
 gjs/coverage.h   |   39 ++++++++++++++++++++-------------------
 2 files changed, 34 insertions(+), 33 deletions(-)
---
diff --git a/gjs/coverage.cpp b/gjs/coverage.cpp
index f31c400..569177a 100644
--- a/gjs/coverage.cpp
+++ b/gjs/coverage.cpp
@@ -1741,7 +1741,7 @@ gjs_coverage_constructed(GObject *object)
 {
     G_OBJECT_CLASS(gjs_coverage_parent_class)->constructed(object);
 
-    GjsCoverage *coverage = GJS_DEBUG_COVERAGE(object);
+    GjsCoverage *coverage = GJS_COVERAGE(object);
     GjsCoveragePrivate *priv = (GjsCoveragePrivate *) gjs_coverage_get_instance_private(coverage);
 
     JSContext *context = (JSContext *) gjs_context_get_native_context(priv->context);
@@ -1763,7 +1763,7 @@ gjs_coverage_set_property(GObject      *object,
                           const GValue *value,
                           GParamSpec   *pspec)
 {
-    GjsCoverage *coverage = GJS_DEBUG_COVERAGE(object);
+    GjsCoverage *coverage = GJS_COVERAGE(object);
     GjsCoveragePrivate *priv = (GjsCoveragePrivate *) gjs_coverage_get_instance_private(coverage);
     switch (prop_id) {
     case PROP_PREFIXES:
@@ -1816,7 +1816,7 @@ gjs_clear_js_side_statistics_from_coverage_object(GjsCoverage *coverage)
 static void
 gjs_coverage_dispose(GObject *object)
 {
-    GjsCoverage *coverage = GJS_DEBUG_COVERAGE(object);
+    GjsCoverage *coverage = GJS_COVERAGE(object);
     GjsCoveragePrivate *priv = (GjsCoveragePrivate *) gjs_coverage_get_instance_private(coverage);
 
     /* Decomission objects inside of the JSContext before
@@ -1830,7 +1830,7 @@ gjs_coverage_dispose(GObject *object)
 static void
 gjs_coverage_finalize (GObject *object)
 {
-    GjsCoverage *coverage = GJS_DEBUG_COVERAGE(object);
+    GjsCoverage *coverage = GJS_COVERAGE(object);
     GjsCoveragePrivate *priv = (GjsCoveragePrivate *) gjs_coverage_get_instance_private(coverage);
 
     g_strfreev(priv->prefixes);
@@ -1875,17 +1875,17 @@ gjs_coverage_class_init (GjsCoverageClass *klass)
  * @coverage_prefixes: (transfer none): A null-terminated strv of prefixes of files to perform coverage on
  * coverage_data for
  *
- * Returns: A #GjsDebugCoverage
+ * Returns: A #GjsCoverage object
  */
 GjsCoverage *
 gjs_coverage_new (const char **prefixes,
                   GjsContext  *context)
 {
     GjsCoverage *coverage =
-        GJS_DEBUG_COVERAGE(g_object_new(GJS_TYPE_DEBUG_COVERAGE,
-                                        "prefixes", prefixes,
-                                        "context", context,
-                                        NULL));
+        GJS_COVERAGE(g_object_new(GJS_TYPE_COVERAGE,
+                                  "prefixes", prefixes,
+                                  "context", context,
+                                  NULL));
 
     return coverage;
 }
@@ -1908,11 +1908,11 @@ gjs_coverage_new_from_cache(const char **coverage_prefixes,
                             const char *cache_path)
 {
     GjsCoverage *coverage =
-        GJS_DEBUG_COVERAGE(g_object_new(GJS_TYPE_DEBUG_COVERAGE,
-                                        "prefixes", coverage_prefixes,
-                                        "context", context,
-                                        "cache", cache_path,
-                                        NULL));
+        GJS_COVERAGE(g_object_new(GJS_TYPE_COVERAGE,
+                                  "prefixes", coverage_prefixes,
+                                  "context", context,
+                                  "cache", cache_path,
+                                  NULL));
 
     return coverage;
 }
diff --git a/gjs/coverage.h b/gjs/coverage.h
index ed08eb4..bf1814d 100644
--- a/gjs/coverage.h
+++ b/gjs/coverage.h
@@ -17,37 +17,36 @@
  *
  * Authored By: Sam Spilsbury <sam endlessm com>
  */
-#ifndef _GJS_DEBUG_COVERAGE_H
-#define _GJS_DEBUG_COVERAGE_H
+#ifndef _GJS_COVERAGE_H
+#define _GJS_COVERAGE_H
 
 #include <glib-object.h>
 
 G_BEGIN_DECLS
 
-#define GJS_TYPE_DEBUG_COVERAGE gjs_coverage_get_type()
+#define GJS_TYPE_COVERAGE gjs_coverage_get_type()
 
-#define GJS_DEBUG_COVERAGE(obj) \
+#define GJS_COVERAGE(obj) \
     (G_TYPE_CHECK_INSTANCE_CAST((obj), \
-     GJS_TYPE_DEBUG_COVERAGE, GjsCoverage))
+     GJS_TYPE_COVERAGE, GjsCoverage))
 
-#define GJS_DEBUG_COVERAGE_CLASS(klass) \
+#define GJS_COVERAGE_CLASS(klass) \
     (G_TYPE_CHECK_CLASS_CAST((klass), \
-     GJS_TYPE_DEBUG_COVERAGE, GjsCoverageClass))
+     GJS_TYPE_COVERAGE, GjsCoverageClass))
 
-#define GJS_IS_DEBUG_COVERAGE(obj) \
+#define GJS_IS_COVERAGE(obj) \
     (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
-     GJS_TYPE_DEBUG_COVERAGE))
+     GJS_TYPE_COVERAGE))
 
-#define GJS_IS_DEBUG_COVERAGE_CLASS(klass) \
+#define GJS_IS_COVERAGE_CLASS(klass) \
     (G_TYPE_CHECK_CLASS_TYPE ((klass), \
-     GJS_TYPE_DEBUG_COVERAGE))
+     GJS_TYPE_COVERAGE))
 
-#define GJS_DEBUG_COVERAGE_GET_CLASS(obj) \
+#define GJS_COVERAGE_GET_CLASS(obj) \
     (G_TYPE_INSTANCE_GET_CLASS ((obj), \
-     GJS_TYPE_DEBUG_COVERAGE, GjsCoverageClass))
+     GJS_TYPE_COVERAGE, GjsCoverageClass))
 
 typedef struct _GFile GFile;
-typedef struct _GjsDebugHooks GjsDebugHooks;
 typedef struct _GjsContext GjsContext;
 
 typedef struct _GjsCoverage GjsCoverage;
@@ -62,13 +61,15 @@ struct _GjsCoverageClass {
     GObjectClass parent_class;
 };
 
-GType gjs_debug_coverage_get_type(void);
+GType gjs_coverage_get_type(void);
 
 /**
- * gjs_debug_coverage_write_statistics:
- * @coverage: A #GjsDebugCoverage
- * @output_file (allow-none): A #GFile to write statistics to. If NULL is provided then coverage data
- * will be written to files in the form of (filename).info in the same directory as the input file
+ * gjs_coverage_write_statistics:
+ * @coverage: A #GjsCoveerage
+ * @output_directory: A directory to write coverage information to. Scripts
+ * which were provided as part of the coverage-paths construction property will be written
+ * out to output_directory, in the same directory structure relative to the source dir where
+ * the tests were run.
  *
  * This function takes all available statistics and writes them out to either the file provided
  * or to files of the pattern (filename).info in the same directory as the scanned files. It will


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]