<commit_before>/*  This file is part of the KDE project
    Copyright (C) 2006 <NAME> <<EMAIL>>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License version 2
    as published by the Free Software Foundation.

    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, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.

*/

#ifndef MEDIAOBJECTTEST_H
#define MEDIAOBJECTTEST_H

#include <QObject>
#include <kurl.h>
#include <phonon/bytestream.h>
#include <phonon/audiopath.h>
#include <phonon/audiooutput.h>
#include <QtTest/QSignalSpy>
#include <kio/jobclasses.h>

class ByteStreamTest : public QObject
{
	Q_OBJECT
	public:
		ByteStreamTest()
			: m_job( 0 ),
			m_media( 0 ),
			m_stateChangedSignalSpy( 0 ),
			m_audioPath( 0 ),
			m_audioOutput( 0 )
		{}

	private Q_SLOTS:
		void initTestCase();
		void setMedia();
		void checkForDefaults();

		void addPaths();
		void initOutput();

		// state change tests
		void stopToStop();
		void stopToPause();
		void stopToPlay();
		void playToPlay();
		void playToPause();
		void playToStop();
		void pauseToPause();
		void pauseToPlay();
		void pauseToStop();

		void testSeek();
		void testAboutToFinish();
		void testTickSignal();

		void cleanupTestCase();

		void kioTotalSize(KJob*,qulonglong size);
		void kioData(KIO::Job*,const QByteArray&);
		void kioResult(KJob*);
        void kioSeekDone(KIO::Job*, KIO::filesize_t);
        void needData();
        void enoughData();
        void seekStream(qint64 offset);<commit_msg>make slots protected so they're not called as test functions<commit_after>/*  This file is part of the KDE project
    Copyright (C) 2006 <NAME> <<EMAIL>>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License version 2
    as published by the Free Software Foundation.

    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, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.

*/

#ifndef MEDIAOBJECTTEST_H
#define MEDIAOBJECTTEST_H

#include <QObject>
#include <kurl.h>
#include <phonon/bytestream.h>
#include <phonon/audiopath.h>
#include <phonon/audiooutput.h>
#include <QtTest/QSignalSpy>
#include <kio/jobclasses.h>

class ByteStreamTest : public QObject
{
	Q_OBJECT
	public:
		ByteStreamTest()
			: m_job( 0 ),
			m_media( 0 ),
			m_stateChangedSignalSpy( 0 ),
			m_audioPath( 0 ),
			m_audioOutput( 0 )
		{}

	private Q_SLOTS:
		void initTestCase();
		void setMedia();
		void checkForDefaults();

		void addPaths();
		void initOutput();

		// state change tests
		void stopToStop();
		void stopToPause();
		void stopToPlay();
		void playToPlay();
		void playToPause();
		void playToStop();
		void pauseToPause();
		void pauseToPlay();
		void pauseToStop();

		void testSeek();
		void testAboutToFinish();
		void testTickSignal();

		void cleanupTestCase();

    protected slots:
		void kioTotalSize(KJob*,qulonglong size);
		void kioData(KIO::Job*,const QByteArray&);
		void kioResult(KJob*);
        void kioSeekDone(KIO::Job*, KIO::filesize_t);
        void needData();
        void enoughData();
        void seekStream(qint64 offset);
{'fraction_non_alphanumeric': 0.09263050153531217, 'fraction_numerical': 0.011770726714431934, 'mean_word_length': 3.7670731707317073, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4702592', 'n_tokens_mistral': 1329, 'n_tokens_neox': 1187, 'n_words': 430}