Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Threema/ThreemaFrameworkTests/   (Social Medium ©)  Datei vom 26.9.2026 mit Größe 988 B image not shown  

Quelle  PhotosRightsHelperTest.swift   Sprache: JAVA

 

import XCTest
@testable import ThreemaFramework

final class PhotosRightsHelperTest: XCTestCase {

    func testPhotosRights() throws {
        let table: [([Bool], PhotosRights)] = [
            ([true, true, true, true, true, true], .full),
            ([false, true, true, true, true, true], .write),
            ([false, false, false, true, true, true], .none),
        ]
        
        var mock: PhotosRightsHelperMock
        
        for item in table {
            mock = PhotosRightsHelperMock(
                accessLevelDetermined: item.0[0],
                requestWriteAccess: item.0[1],
                requestReadAccess: item.0[2],
                readAccess: item.0[3],
                fullAccess: item.0[4],
                writeAccess: item.0[5]
            )
            let result = PhotosRightsHelper.checkAccessAllowed(rightsHelper: mock)
            XCTAssert(result == item.1, "Result is \(result), but should be \(item.1). For input \(item)")
        }
    }
}

Messung
CHZG
859510093

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-11-04) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.