aboutsummaryrefslogtreecommitdiffstats
path: root/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/task/util/file/FileAttributesTest.java
blob: ed183738ef08e1f34a6cb534e3fbe5b199eaa71a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.admin.task.util.file;

import org.junit.jupiter.api.Test;

import static com.yahoo.vespa.hosted.node.admin.task.util.file.FileAttributes.deviceMajor;
import static com.yahoo.vespa.hosted.node.admin.task.util.file.FileAttributes.deviceMinor;
import static org.junit.jupiter.api.Assertions.assertEquals;

/**
 * @author freva
 */
class FileAttributesTest {

    @Test
    void parse_dev_t() {
        assertEquals(0x12345BCD, deviceMajor(0x1234567890ABCDEFL));
        assertEquals(0x67890AEF, deviceMinor(0x1234567890ABCDEFL));
    }
}