Sha256: 7972d92171b970576fc66f6c1795524f8224dcd20dd37f9f1b3add25bbaaa1a2

Contents?: true

Size: 1.24 KB

Versions: 24

Compression:

Stored size: 1.24 KB

Contents

#!/usr/bin/env python3
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

""" Unit tests for the msvs.py file. """

import gyp.generator.msvs as msvs
import unittest

from io import StringIO


class TestSequenceFunctions(unittest.TestCase):
    def setUp(self):
        self.stderr = StringIO()

    def test_GetLibraries(self):
        self.assertEqual(msvs._GetLibraries({}), [])
        self.assertEqual(msvs._GetLibraries({"libraries": []}), [])
        self.assertEqual(
            msvs._GetLibraries({"other": "foo", "libraries": ["a.lib"]}), ["a.lib"]
        )
        self.assertEqual(msvs._GetLibraries({"libraries": ["-la"]}), ["a.lib"])
        self.assertEqual(
            msvs._GetLibraries(
                {
                    "libraries": [
                        "a.lib",
                        "b.lib",
                        "c.lib",
                        "-lb.lib",
                        "-lb.lib",
                        "d.lib",
                        "a.lib",
                    ]
                }
            ),
            ["c.lib", "b.lib", "d.lib", "a.lib"],
        )


if __name__ == "__main__":
    unittest.main()

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
immosquare-cleaner-0.1.51 node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
immosquare-cleaner-0.1.50 node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
immosquare-cleaner-0.1.49 node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
immosquare-cleaner-0.1.48 node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
immosquare-cleaner-0.1.47 node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
immosquare-cleaner-0.1.46 node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
immosquare-cleaner-0.1.45 node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
immosquare-cleaner-0.1.44 node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
immosquare-cleaner-0.1.43 node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
immosquare-cleaner-0.1.42 node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
immosquare-cleaner-0.1.41 node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
immosquare-cleaner-0.1.40 node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
immosquare-cleaner-0.1.39 node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
immosquare-cleaner-0.1.38 node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
immosquare-cleaner-0.1.32 node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
immosquare-cleaner-0.1.31 node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
immosquare-cleaner-0.1.30 node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
immosquare-cleaner-0.1.29 node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
immosquare-cleaner-0.1.28 node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
immosquare-cleaner-0.1.27 node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py