Files
Aaru/Aaru.Tests/Partitions/Atari.cs

218 lines
7.1 KiB
C#
Raw Normal View History

2017-07-18 06:33:47 +01:00
// /***************************************************************************
2020-07-25 02:01:36 +01:00
// Aaru Data Preservation Suite
2017-07-18 06:33:47 +01:00
// ----------------------------------------------------------------------------
//
// Filename : Atari.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
2017-07-18 06:33:47 +01:00
//
2020-07-25 02:01:36 +01:00
// Component : Aaru unit testing.
2017-07-18 06:33:47 +01:00
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
2022-12-03 16:07:10 +00:00
// Copyright © 2011-2023 Natalia Portillo
2017-07-18 06:33:47 +01:00
// ****************************************************************************/
2017-07-18 06:33:47 +01:00
using System.IO;
2020-02-27 00:33:26 +00:00
using Aaru.CommonTypes;
2017-07-18 06:33:47 +01:00
using NUnit.Framework;
namespace Aaru.Tests.Partitions;
2022-03-06 13:29:38 +00:00
[TestFixture]
public class Atari : PartitionSchemeTest
2017-07-18 06:33:47 +01:00
{
2022-11-13 05:48:58 +00:00
public override string DataFolder => Path.Combine(Consts.TestFilesRoot, "Partitioning schemes", "Atari ST");
2022-03-06 13:29:38 +00:00
public override PartitionTest[] Tests => new[]
2017-07-18 06:33:47 +01:00
{
2022-03-06 13:29:38 +00:00
new PartitionTest
2017-12-19 20:33:03 +00:00
{
2022-03-06 13:29:38 +00:00
TestFile = "linux_ahdi.aif",
Partitions = new[]
2017-12-19 20:33:03 +00:00
{
2022-03-06 13:29:38 +00:00
new Partition
{
Length = 61440,
Offset = 512,
Sequence = 0,
Size = 31457280,
Start = 1,
Type = "GEM"
},
new Partition
{
Length = 81920,
Offset = 31457792,
Sequence = 1,
Size = 41943040,
Start = 61441,
Type = "BGM"
},
new Partition
{
Description = "Macintosh partition",
Length = 102399,
Offset = 512,
Sequence = 1,
Size = 52428288,
Start = 1,
Type = "MAC"
2022-03-06 13:29:38 +00:00
},
new Partition
{
Description = "Linux partition",
Length = 92160,
Offset = 73400832,
Sequence = 3,
Size = 47185920,
Start = 143361,
Type = "LNX"
2017-12-21 02:52:12 +00:00
}
2022-03-06 13:29:38 +00:00
}
},
new PartitionTest
{
TestFile = "linux_icd.aif",
Partitions = new[]
2017-12-19 20:33:03 +00:00
{
2022-03-06 13:29:38 +00:00
new Partition
{
Length = 30720,
Offset = 512,
Sequence = 0,
Size = 15728640,
Start = 1,
Type = "GEM"
},
new Partition
2017-12-19 20:33:03 +00:00
{
2022-03-06 13:29:38 +00:00
Length = 40960,
Offset = 15729152,
Sequence = 1,
Size = 20971520,
Start = 30721,
Type = "UNX"
},
new Partition
{
Length = 61440,
Offset = 36700672,
Sequence = 2,
Size = 31457280,
Start = 71681,
Type = "LNX"
},
new Partition
{
Length = 81920,
Offset = 68157952,
Sequence = 3,
Size = 41943040,
Start = 133121,
Type = "BGM"
},
new Partition
{
Length = 102400,
Offset = 110100992,
Sequence = 4,
Size = 52428800,
Start = 215041,
Type = "MAC"
},
new Partition
{
Length = 122880,
Offset = 162529792,
Sequence = 5,
Size = 62914560,
Start = 317441,
Type = "MIX"
},
new Partition
{
Length = 163840,
Offset = 225444352,
Sequence = 6,
Size = 83886080,
Start = 440321,
Type = "SWP"
},
new Partition
{
Length = 202752,
Offset = 309330432,
Sequence = 7,
Size = 103809024,
Start = 604161,
Type = "MNX"
},
new Partition
{
Length = 204800,
Offset = 413139456,
Sequence = 8,
Size = 104857600,
Start = 806913,
Type = "LNX"
2017-12-21 02:52:12 +00:00
}
2022-03-06 13:29:38 +00:00
}
},
new PartitionTest
{
TestFile = "tos_1.04.aif",
Partitions = new[]
2017-12-19 20:33:03 +00:00
{
2022-03-06 13:29:38 +00:00
new Partition
{
Length = 14336,
Offset = 1024,
Sequence = 0,
Size = 7340032,
Start = 2,
Type = "GEM"
},
new Partition
{
Length = 14336,
Offset = 7341056,
Sequence = 1,
Size = 7340032,
Start = 14338,
Type = "GEM"
},
new Partition
{
Length = 14336,
Offset = 14681088,
Sequence = 2,
Size = 7340032,
Start = 28674,
Type = "GEM"
},
new Partition
2017-12-19 20:33:03 +00:00
{
2022-03-06 13:29:38 +00:00
Length = 14334,
Offset = 22021120,
Sequence = 3,
Size = 7339008,
Start = 43010,
Type = "GEM"
2017-12-21 02:52:12 +00:00
}
}
2022-03-06 13:29:38 +00:00
}
};
2017-12-19 20:33:03 +00:00
}