LCOV - code coverage report
Current view: top level - src/engraving/compat - scoreaccess.cpp Coverage Total Hit
Test: filtered_coverage.info Lines: 50.0 % 16 8
Test Date: 2026-11-05 04:07:02

            Line data    Source code
       1              : /*
       2              :  * SPDX-License-Identifier: GPL-3.0-only
       3              :  * MuseScore-Studio-CLA-applies
       4              :  *
       5              :  * MuseScore Studio
       6              :  * Music Composition & Notation
       7              :  *
       8              :  * Copyright (C) 2021 MuseScore Limited and others
       9              :  *
      10              :  * This program is free software: you can redistribute it and/or modify
      11              :  * it under the terms of the GNU General Public License version 3 as
      12              :  * published by the Free Software Foundation.
      13              :  *
      14              :  * This program is distributed in the hope that it will be useful,
      15              :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      16              :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      17              :  * GNU General Public License for more details.
      18              :  *
      19              :  * You should have received a copy of the GNU General Public License
      20              :  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
      21              :  */
      22              : #include "scoreaccess.h"
      23              : #include "style/defaultstyle.h"
      24              : #include "dom/masterscore.h"
      25              : 
      26              : using namespace mu::engraving;
      27              : using namespace mu::engraving::compat;
      28              : 
      29              : static const muse::modularity::ContextPtr utestCtx = std::make_shared<muse::modularity::Context>(1);
      30              : 
      31          108 : MasterScore* ScoreAccess::createMasterScore(const muse::modularity::ContextPtr& iocCtx)
      32              : {
      33          108 :     const muse::modularity::ContextPtr iocCtx_ = iocCtx ? iocCtx : utestCtx;
      34          216 :     return new MasterScore(iocCtx_);
      35          108 : }
      36              : 
      37         2061 : MasterScore* ScoreAccess::createMasterScoreWithBaseStyle(const muse::modularity::ContextPtr& iocCtx)
      38              : {
      39         2061 :     const muse::modularity::ContextPtr iocCtx_ = iocCtx ? iocCtx : utestCtx;
      40         4122 :     return new MasterScore(iocCtx_, DefaultStyle::baseStyle());
      41         2061 : }
      42              : 
      43            0 : MasterScore* ScoreAccess::createMasterScoreWithDefaultStyle(const muse::modularity::ContextPtr& iocCtx)
      44              : {
      45            0 :     const muse::modularity::ContextPtr iocCtx_ = iocCtx ? iocCtx : utestCtx;
      46            0 :     return new MasterScore(iocCtx_, DefaultStyle::defaultStyle());
      47            0 : }
      48              : 
      49            0 : MasterScore* ScoreAccess::createMasterScore(const muse::modularity::ContextPtr& iocCtx, const MStyle& style)
      50              : {
      51            0 :     const muse::modularity::ContextPtr iocCtx_ = iocCtx ? iocCtx : utestCtx;
      52            0 :     return new MasterScore(iocCtx_, style);
      53            0 : }
        

Generated by: LCOV version 2.0-1