LCOV - code coverage report
Current view: top level - backend/catalog - measure_catalog_test.cc (source / functions) Coverage Total Hit
Test: _coverage_report.dat Lines: 100.0 % 12 12
Test Date: 2026-07-02 21:01:18 Functions: 100.0 % 1 1

            Line data    Source code
       1              : #include "backend/catalog/measure_catalog.h"
       2              : 
       3              : #include "backend/schema/schema.h"
       4              : #include "gtest/gtest.h"
       5              : 
       6              : namespace bigquery_emulator {
       7              : namespace backend {
       8              : namespace catalog {
       9              : namespace {
      10              : 
      11            1 : TEST(MeasureCatalogTest, ParseMeasureColumnSpecFromDescription) {
      12            1 :   schema::ColumnSchema column;
      13            1 :   column.name = "total_sales";
      14            1 :   column.type = schema::ColumnType::kInt64;
      15            1 :   column.description = "bqemu_measure:SUM(amount):store_id";
      16            1 :   std::optional<MeasureColumnSpec> spec = ParseMeasureColumnSpec(column);
      17            1 :   ASSERT_TRUE(spec.has_value());
      18            1 :   EXPECT_EQ(spec->name, "total_sales");
      19            1 :   EXPECT_EQ(spec->expression, "SUM(amount)");
      20            1 :   ASSERT_EQ(spec->row_key_names.size(), 1u);
      21            1 :   EXPECT_EQ(spec->row_key_names[0], "store_id");
      22            1 : }
      23              : 
      24              : }  // namespace
      25              : }  // namespace catalog
      26              : }  // namespace backend
      27              : }  // namespace bigquery_emulator
        

Generated by: LCOV version 2.0-1