# Path: dtformats/prefetch.py
# def CalculatePrefetchHashXP(path):
# def CalculatePrefetchHashVista(path):
# def CalculatePrefetchHash2008(path):
# 
# Path: tests/test_lib.py
# class BaseTestCase(unittest.TestCase):
# class TestOutputWriter(output_writers.OutputWriter):
#   _TEST_DATA_PATH = os.path.join(os.getcwd(), 'test_data')
#   def _GetTestFilePath(self, path_segments):
#   def _SkipIfPathNotExists(self, path):
#   def __init__(self):
#   def Close(self):
#   def Open(self):
#   def WriteText(self, text):


import unittest
from dtformats import prefetch
from tests import test_lib
# -*- coding: utf-8 -*-
"""Tests for prefetch functions."""





class PrefetchTest(test_lib.BaseTestCase):
  """Prefetch function tests."""

  def testCalculatePrefetchHashXP(self):
    """Tests the CalculatePrefetchHashXP function."""
    # Path from Windows XP CMD.EXE-087B4001.pf
    path = '\\DEVICE\\HARDDISKVOLUME1\\WINDOWS\\SYSTEM32\\CMD.EXE'

    hash_value = prefetch.CalculatePrefetchHashXP(path)
    self.assertEqual(hash_value, 0x087b4001)

  def testCalculatePrefetchHashVista(self):
    """Tests the CalculatePrefetchHashVista function."""
    # Path from Windows Vista NETCFG.EXE-F61A0ADB.pf
    path = '\\DEVICE\\HARDDISKVOLUME2\\WINDOWS\\SYSTEM32\\NETCFG.EXE'


# Path: dtformats/prefetch.py
# def CalculatePrefetchHashXP(path):
# def CalculatePrefetchHashVista(path):
# def CalculatePrefetchHash2008(path):
# 
# Path: tests/test_lib.py
# class BaseTestCase(unittest.TestCase):
# class TestOutputWriter(output_writers.OutputWriter):
#   _TEST_DATA_PATH = os.path.join(os.getcwd(), 'test_data')
#   def _GetTestFilePath(self, path_segments):
#   def _SkipIfPathNotExists(self, path):
#   def __init__(self):
#   def Close(self):
#   def Open(self):
#   def WriteText(self, text):


# Path: tests/prefetch.py
import unittest
from dtformats import prefetch
from tests import test_lib

# -*- coding: utf-8 -*-
"""Tests for prefetch functions."""





class PrefetchTest(test_lib.BaseTestCase):
  """Prefetch function tests."""

  def testCalculatePrefetchHashXP(self):
    """Tests the CalculatePrefetchHashXP function."""
    # Path from Windows XP CMD.EXE-087B4001.pf
    path = '\\DEVICE\\HARDDISKVOLUME1\\WINDOWS\\SYSTEM32\\CMD.EXE'

    hash_value = prefetch.CalculatePrefetchHashXP(path)
    self.assertEqual(hash_value, 0x087b4001)

  def testCalculatePrefetchHashVista(self):
    """Tests the CalculatePrefetchHashVista function."""
    # Path from Windows Vista NETCFG.EXE-F61A0ADB.pf
    path = '\\DEVICE\\HARDDISKVOLUME2\\WINDOWS\\SYSTEM32\\NETCFG.EXE'


    hash_value = prefetch.CalculatePrefetchHashVista(path)