public void AddingMoreThan13MarkersThrowsException()
        {
            MarkerStack playerMarkerStack = MarkerStack.PlayerMarkerStack();

            playerMarkerStack.addMarkers(13);
            playerMarkerStack.addMarkers(1);
        }
        public void RemovingMoreThan13MarkersThrowsException()
        {
            MarkerStack markerStack = MarkerStack.GameMarkerStack();

            markerStack.removeMarkers(13);
            markerStack.removeMarkers(1);
        }
        public void RemovingUpTo13MarkersFromAFullStackIsOk()
        {
            MarkerStack gameMarkerStack = MarkerStack.GameMarkerStack();

            gameMarkerStack.removeMarkers(1);
            gameMarkerStack.removeMarkers(4);
            gameMarkerStack.removeMarkers(5);
            gameMarkerStack.removeMarkers(3);

            Assert.AreEqual(0, gameMarkerStack.Count());
        }
        public void AddingUpTo13MarkersToEmptyStackIsOk()
        {
            MarkerStack playerMarkerStack = MarkerStack.PlayerMarkerStack();

            playerMarkerStack.addMarkers(1);
            playerMarkerStack.addMarkers(4);
            playerMarkerStack.addMarkers(5);
            playerMarkerStack.addMarkers(3);

            Assert.AreEqual(13, playerMarkerStack.Count());
        }
Beispiel #5
0
 internal ProfilerProtocolStream(ulong streamId)
 {
     threadId          = (ulong)streamId;
     blockIndex        = 0;
     blockSizeStart    = 0;
     blockSizeExpected = 0;
     profiledFrame     = 0;
     unsafe
     {
         // This builder is tracked so all can be freed during application shutdown - no need to destroy manually
         buffer = MessageStreamManager.CreateStreamBuilder();
     }
     markerStack = new MarkerStack();
 }
        public void RemovingMoreThan13MarkersDoesNotChangeTheCounter()
        {
            MarkerStack markerStack = MarkerStack.GameMarkerStack();

            try
            {
                markerStack.removeMarkers(13);
                markerStack.removeMarkers(1);
            }
            catch (ArgumentOutOfRangeException exArg)
            {
                Assert.AreEqual(0, markerStack.Count());
            }
        }
        public void AddingMoreThan13MarkersDoesNotChangeTheCounter()
        {
            MarkerStack playerMarkerStack = MarkerStack.PlayerMarkerStack();

            try
            {
                playerMarkerStack.addMarkers(13);
                playerMarkerStack.addMarkers(1);
            }
            catch (ArgumentOutOfRangeException exArg)
            {
                Assert.AreEqual(13, playerMarkerStack.Count());
            }
        }
        public void NewGameMarkerStackHas13Markers()
        {
            MarkerStack gameMarkerStack = MarkerStack.GameMarkerStack();

            Assert.AreEqual(13, gameMarkerStack.Count());
        }
        public void NewPlayerMarkerStackIsEmpty()
        {
            MarkerStack playerMarkerStack = MarkerStack.PlayerMarkerStack();

            Assert.AreEqual(0, playerMarkerStack.Count());
        }